Update testing nms package
Dieser Commit ist enthalten in:
Ursprung
776ec56a2d
Commit
7e12f57eda
@ -21,7 +21,7 @@ package com.comphenix.protocol.utility;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public final class Constants {
|
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 NMS = "net.minecraft.server." + PACKAGE_VERSION;
|
||||||
public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION;
|
public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION;
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,7 @@ public class PacketContainerTest {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,6 +587,15 @@ public class PacketContainerTest {
|
|||||||
assertEquals(a, b);
|
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.
|
* Get the underlying array as an object array.
|
||||||
* @param val - array wrapped as an Object.
|
* @param val - array wrapped as an Object.
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren