diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/InventorySerializer.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/InventorySerializer.java index ca8f84b..b0388cc 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/InventorySerializer.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/InventorySerializer.java @@ -20,10 +20,12 @@ import at.pcgamingfreaks.Bukkit.ItemStackSerializer.ItemStackSerializer; import at.pcgamingfreaks.Bukkit.MCVersion; import at.pcgamingfreaks.ConsoleColor; + import lombok.Getter; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; +import java.util.logging.Level; import java.util.logging.Logger; public class InventorySerializer @@ -49,13 +51,16 @@ public InventorySerializer(Logger logger) } catch(Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to produce serializer!", e); } if(serializer == null) { logger.severe("NBTItemStackSerializer does not support your Minecraft version!\nFalling back to BukkitItemStackSerializer! This most likely is wrong!"); - usedSerializer = 0; - serializer = BUKKIT_ITEM_STACK_SERIALIZER; + if (MCVersion.isOlderThan(MCVersion.MC_NMS_1_8_R1)) + { + usedSerializer = 0; + serializer = BUKKIT_ITEM_STACK_SERIALIZER; + } } this.serializer = serializer; this.usedSerializer = usedSerializer; diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java index 500c6b4..feb9410 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java @@ -126,7 +126,7 @@ public void onEnable() private boolean checkMcVersion() { - if(MCVersion.is(MCVersion.UNKNOWN) || !MCVersion.isUUIDsSupportAvailable() || MCVersion.isNewerThan(MCVersion.MC_NMS_1_20_R2)) + if(MCVersion.is(MCVersion.UNKNOWN) || !MCVersion.isUUIDsSupportAvailable() || MCVersion.isNewerThan(MCVersion.MC_NMS_1_20_R3)) { this.warnOnVersionIncompatibility(); this.setEnabled(false); diff --git a/pom.xml b/pom.xml index f479670..bc3afaa 100644 --- a/pom.xml +++ b/pom.xml @@ -7,13 +7,13 @@ pom - 2.4.24-SNAPSHOT + 2.4.24 UTF-8 UTF-8 34 20 - 1.0.39.2-SNAPSHOT + 1.0.39.3-SNAPSHOT 1.15.2-R0.1-SNAPSHOT 3.4.1