diff --git a/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java b/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java index 137bd304..d44b4775 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java +++ b/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java @@ -21,7 +21,7 @@ package com.comphenix.protocol.utility; */ public final class Constants { - public static final String PACKAGE_VERSION = "v1_13_R1"; + public static final String PACKAGE_VERSION = "v1_13_R2"; public static final String NMS = "net.minecraft.server." + PACKAGE_VERSION; public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION; } diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java index 3fe19eca..c1047439 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java @@ -575,7 +575,7 @@ public class PacketContainerTest { return; } } else { - if (a.equals(b) || Objects.equals(a, b) || a.toString().equals(b.toString())) { + if (a.equals(b) || Objects.equals(a, b) || stringEquality(a, b)) { return; } } @@ -587,6 +587,15 @@ public class PacketContainerTest { assertEquals(a, b); } + private boolean stringEquality(Object a, Object b) { + try { + return a.toString().equals(b.toString()); + } catch (Exception ex) { + // internal null pointers, usually + return false; + } + } + /** * Get the underlying array as an object array. * @param val - array wrapped as an Object.