mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-09-18 10:31:03 +02: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() {
|
public StructureModifier<WrappedChatComponent[]> getChatComponentArrays() {
|
||||||
// Convert to and from the Bukkit wrapper
|
// Convert to and from the Bukkit wrapper
|
||||||
return structureModifier.<WrappedChatComponent[]>withType(
|
return structureModifier.<WrappedChatComponent[]>withType(
|
||||||
MinecraftReflection.getIChatBaseComponentClass(),
|
MinecraftReflection.getIChatBaseComponentArrayClass(),
|
||||||
BukkitConverters.getIgnoreNull(new WrappedChatComponentArrayConverter()));
|
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.
|
* Retrieve the NMS chat component text class.
|
||||||
* @return The chat component class.
|
* @return The chat component class.
|
||||||
|
Loading…
Reference in New Issue
Block a user