Fix a typo in WrappedSignedProperty
Dieser Commit ist enthalten in:
Ursprung
84b502cba7
Commit
3f5abe8719
@ -12,6 +12,9 @@ import com.google.common.base.Objects;
|
|||||||
* @author Kristian
|
* @author Kristian
|
||||||
*/
|
*/
|
||||||
public class WrappedSignedProperty extends AbstractWrapper {
|
public class WrappedSignedProperty extends AbstractWrapper {
|
||||||
|
private static final String CLASS_NAME = "com.mojang.authlib.properties.Property";
|
||||||
|
private static final String UTIL_PACKAGE = "net.minecraft.util.";
|
||||||
|
|
||||||
private static Class<?> PROPERTY;
|
private static Class<?> PROPERTY;
|
||||||
private static ConstructorAccessor CONSTRUCTOR;
|
private static ConstructorAccessor CONSTRUCTOR;
|
||||||
private static MethodAccessor GET_NAME;
|
private static MethodAccessor GET_NAME;
|
||||||
@ -22,21 +25,25 @@ public class WrappedSignedProperty extends AbstractWrapper {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
PROPERTY = Class.forName("com.mojang.authlib.properties.Property");
|
PROPERTY = Class.forName(CLASS_NAME);
|
||||||
} catch (ClassNotFoundException ex) {
|
} catch (ClassNotFoundException ex) {
|
||||||
try {
|
try {
|
||||||
PROPERTY = Class.forName("net.minecraft.util.com.mojang.authlib.properties.Property");
|
PROPERTY = Class.forName(UTIL_PACKAGE + CLASS_NAME);
|
||||||
} catch (ClassNotFoundException ex1) {
|
} catch (ClassNotFoundException ex1) {
|
||||||
throw new RuntimeException("Failed to obtain Property class", ex);
|
throw new RuntimeException("Failed to obtain Property class.", ex1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CONSTRUCTOR = Accessors.getConstructorAccessor(PROPERTY, String.class, String.class, String.class);
|
try {
|
||||||
GET_NAME = Accessors.getMethodAccessor(PROPERTY, "getName");
|
CONSTRUCTOR = Accessors.getConstructorAccessor(PROPERTY, String.class, String.class, String.class);
|
||||||
GET_SIGNATURE = Accessors.getMethodAccessor(PROPERTY, "getSignature");
|
GET_NAME = Accessors.getMethodAccessor(PROPERTY, "getName");
|
||||||
GET_VALUE = Accessors.getMethodAccessor(PROPERTY, "getValue");
|
GET_SIGNATURE = Accessors.getMethodAccessor(PROPERTY, "getSignature");
|
||||||
HAS_SIGNATURE = Accessors.getMethodAccessor(PROPERTY, "hasSignature");
|
GET_VALUE = Accessors.getMethodAccessor(PROPERTY, "getValue");
|
||||||
IS_SIGNATURE_VALID = Accessors.getMethodAccessor(PROPERTY, "isSigntureValid", PublicKey.class);
|
HAS_SIGNATURE = Accessors.getMethodAccessor(PROPERTY, "hasSignature");
|
||||||
|
IS_SIGNATURE_VALID = Accessors.getMethodAccessor(PROPERTY, "isSignatureValid", PublicKey.class);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
throw new RuntimeException("Failed to obtain methods for Property.", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren