package team.unstudio.udpl.util;

import team.unstudio.udpl.nms.ReflectionUtils;

public enum BukkitVersion{
	
	V1_12_R1(1201),
	V1_11_R1(1101),
	V1_10_R1(1001),
	V1_9_R2(902),
	V1_9_R1(901),
	V1_8_R3(803),
	V1_8_R2(802),
	V1_8_R1(801);

	public static final BukkitVersion CURRENT_BUKKIT_VERSION = valueOf(ReflectionUtils.PackageType.getServerVersion().toUpperCase());
			
	private final int index;
	
	BukkitVersion(int index) {
		this.index = index;
	}

	public int getIndex() {
		return index;
	}
}

@@ -123,14 +123,8 @@
 2_R1
-(1201)
 ,%0D%0A%09
@@ -135,14 +135,8 @@
 1_R1
-(1101)
 ,%0D%0A%09
@@ -147,14 +147,8 @@
 0_R1
-(1001)
 ,%0D%0A%09
@@ -158,13 +158,8 @@
 9_R2
-(902)
 ,%0D%0A%09
@@ -169,13 +169,8 @@
 9_R1
-(901)
 ,%0D%0A%09
@@ -180,13 +180,8 @@
 8_R3
-(803)
 ,%0D%0A%09
@@ -191,13 +191,8 @@
 8_R2
-(802)
 ,%0D%0A%09
@@ -202,13 +202,8 @@
 8_R1
-(801)
 ;%0D%0A%0D
@@ -346,92 +346,91 @@
 %0D%0A%09p
-rivate final int index;%0D%0A%09%0D%0A%09BukkitVersion(int index) %7B%0D%0A%09%09this.index = index
+ublic boolean isAbove(BukkitVersion value)%7B%0D%0A%09%09return compareTo(value) %3E= 0
 ;%0D%0A%09%7D%0D%0A
+%09
 %0D%0A%09p
@@ -439,40 +439,77 @@
 lic 
-int getIndex() %7B%0D%0A%09%09return index
+boolean isBelow(BukkitVersion value)%7B%0D%0A%09%09return compareTo(value) %3C= 0
 ;%0D%0A%09

Update BukkitVersion