mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-02-20 14:32:30 +01:00
Update testing nms package
This commit is contained in:
parent
776ec56a2d
commit
7e12f57eda
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user