package com.github.niwaniwa.we.core.util;

import org.bukkit.Bukkit;

public class Versioning {

	private static Versioning instance = new Versioning();

	private boolean support = false;
	private String craftBukkitVersion = "v1_8_R3";
	private int javaVersion;

	private Versioning() {
		this.support = versionCheck();
		instance = this;
	}

	private boolean versionCheck(){
		int javaVersion = Integer.valueOf(System.getProperty("java.version").split("_")[1]);
		this.javaVersion = javaVersion;
		if(javaVersion <= 1.7){ return false; }
		// TODO: CraftBukkit
		String packageName = Bukkit.getServer().getClass().getPackage().getName();
		craftBukkitVersion = packageName.substring(packageName.lastIndexOf('.') + 1);
		if(!craftBukkitVersion.equalsIgnoreCase("v1_8_R3")){ return false; }
		return true;
	}

	public static Versioning getInstance(){
		return instance;
	}

	public boolean isSupport() {
		return support;
	}

	public String getCraftBukkitVersion() {
		return craftBukkitVersion;
	}

	public int getJavaVersion() {
		return javaVersion;
	}


}

@@ -494,50 +494,8 @@
 on;%0A
-%09%09if(javaVersion %3C= 1.7)%7B return false; %7D%0A
 %09%09//
@@ -722,16 +722,42 @@
 1_8_R3%22)
+%0A%09%09%09%09%7C%7C javaVersion %3C= 1.7
 )%7B retur

Change check code