mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 21:26:17 +01:00
Fix an issue getting chat component arrays
This commit is contained in:
parent
1c8e3b5ee3
commit
18a45aace0
@ -614,7 +614,7 @@ public class PacketContainer implements Serializable {
|
||||
public StructureModifier<WrappedChatComponent[]> getChatComponentArrays() {
|
||||
// Convert to and from the Bukkit wrapper
|
||||
return structureModifier.<WrappedChatComponent[]>withType(
|
||||
MinecraftReflection.getIChatBaseComponentClass(),
|
||||
MinecraftReflection.getIChatBaseComponentArrayClass(),
|
||||
BukkitConverters.getIgnoreNull(new WrappedChatComponentArrayConverter()));
|
||||
}
|
||||
|
||||
|
@ -742,6 +742,10 @@ public class MinecraftReflection {
|
||||
}
|
||||
}
|
||||
|
||||
public static Class<?> getIChatBaseComponentArrayClass() {
|
||||
return getArrayClass(getIChatBaseComponentClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the NMS chat component text class.
|
||||
* @return The chat component class.
|
||||
|
Loading…
Reference in New Issue
Block a user