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;
	private int javaVersion;

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

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


}

@@ -226,19 +226,22 @@
 private 
-int
+double
  javaVer
@@ -366,14 +366,20 @@
 %7B%0A%09%09
-this.j
+String tempJ
 avaV
@@ -391,24 +391,8 @@
 n = 
-Integer.valueOf(
 Syst
@@ -437,35 +437,11 @@
 _%22)%5B
-1%5D);%0A%09%09// TODO: CraftBukkit
+0%5D;
 %0A%09%09S
@@ -594,16 +594,233 @@
 ) + 1);%0A
+%09%09if(tempJavaVersion.lastIndexOf(%22.%22) == -1)%7B%0A%09%09%09this.javaVersion = 0;%0A%09%09%09return false;%0A%09%09%7D%0A%09%09this.javaVersion =  Double.valueOf(tempJavaVersion.substring(0, tempJavaVersion.lastIndexOf(%22.%22)));%0A%09%09// TODO: CraftBukkit%0A
 %09%09if(!cr
@@ -1129,11 +1129,14 @@
 lic 
-int
+double
  get

Fix method