Use correct methods for WrappedChatComponent
Dieser Commit ist enthalten in:
Ursprung
09e2312d80
Commit
6ddbbfb428
@ -25,18 +25,16 @@ public class WrappedChatComponent extends AbstractWrapper {
|
|||||||
FuzzyReflection fuzzy = FuzzyReflection.fromClass(SERIALIZER);
|
FuzzyReflection fuzzy = FuzzyReflection.fromClass(SERIALIZER);
|
||||||
|
|
||||||
// Retrieve the correct methods
|
// Retrieve the correct methods
|
||||||
SERIALIZE_COMPONENT = Accessors.getMethodAccessor(
|
SERIALIZE_COMPONENT = Accessors.getMethodAccessor(fuzzy.getMethodByParameters("a", /* serialize */
|
||||||
fuzzy.getMethodByParameters("serialize", String.class, new Class<?>[] { COMPONENT }));
|
String.class, new Class<?>[] { COMPONENT }));
|
||||||
DESERIALIZE_COMPONENT = Accessors.getMethodAccessor(
|
DESERIALIZE_COMPONENT = Accessors.getMethodAccessor(fuzzy.getMethodByParameters("a", /* serialize */
|
||||||
fuzzy.getMethodByParameters("serialize", COMPONENT, new Class<?>[] { String.class }));
|
COMPONENT, new Class<?>[] { String.class }));
|
||||||
|
|
||||||
// Get a component from a standard Minecraft message
|
// Get a component from a standard Minecraft message
|
||||||
CONSTRUCT_COMPONENT = Accessors.getMethodAccessor(
|
CONSTRUCT_COMPONENT = Accessors.getMethodAccessor(MinecraftReflection.getCraftChatMessage(), "fromString", String.class);
|
||||||
MinecraftReflection.getCraftChatMessage(), "fromString", String.class);
|
|
||||||
|
|
||||||
// And the component text constructor
|
// And the component text constructor
|
||||||
CONSTRUCT_TEXT_COMPONENT = Accessors.getConstructorAccessor(
|
CONSTRUCT_TEXT_COMPONENT = Accessors.getConstructorAccessor(MinecraftReflection.getChatComponentTextClass(), String.class);
|
||||||
MinecraftReflection.getChatComponentTextClass(), String.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private transient String cache;
|
private transient String cache;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren