Fix an issue getting chat component arrays

This commit is contained in:
Dan Mulloy 2014-12-01 16:11:27 -05:00
parent 1c8e3b5ee3
commit 18a45aace0
2 changed files with 5 additions and 1 deletions

View File

@ -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()));
}

View File

@ -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.