Added 1.16.2 Support.

This commit is contained in:
BadBones69 2020-08-18 00:48:40 -04:00
parent 07ae647303
commit 4de44321cf
4 changed files with 8 additions and 2 deletions

View File

@ -46,7 +46,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<version>1.16.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>

View File

@ -205,6 +205,9 @@ public class FileManager {
} catch (IOException e) {
System.out.println(prefix + "Could not save " + file.getFileName() + "!");
e.printStackTrace();
} catch (NullPointerException e) {
System.out.println(prefix + "File is null " + file.getFileName() + "!");
e.printStackTrace();
}
}

View File

@ -13,6 +13,9 @@ public enum Version {
v1_12_R1(1121),
v1_13_R2(1132),
v1_14_R1(1141),
v1_15_R1(1151),
v1_16_R1(1161),
v1_16_R2(1162),
TOO_NEW(-2);
private static Version currentVersion;

View File

@ -322,7 +322,7 @@ public class GUI implements Listener {
}
Inventory inv = Bukkit.createInventory(null, 27, Methods.color(config.getString("Settings.Bidding-On-Item")));
if (!bidding.containsKey(player)) bidding.put(player, 0);
if (Version.getCurrentVersion().isNewer(Version.v1_12_R1)) {
if (Version.isNewer(Version.v1_12_R1)) {
inv.setItem(9, Methods.makeItem("LIME_STAINED_GLASS_PANE", 1, "&a+1"));
inv.setItem(10, Methods.makeItem("LIME_STAINED_GLASS_PANE", 1, "&a+10"));
inv.setItem(11, Methods.makeItem("LIME_STAINED_GLASS_PANE", 1, "&a+100"));