From 80b99fccd9b002287c313f52986c78d8f00b9224 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 13 Nov 2012 16:43:52 +0100 Subject: [PATCH] Added some array methods too. --- .../protocol/events/PacketContainer.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java b/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java index 5d62e953..4150acba 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java @@ -178,6 +178,22 @@ public class PacketContainer implements Serializable { return structureModifier.withType(String.class); } + /** + * Retrieves a read/write structure for every String array field. + * @return A modifier for every String array field. + */ + public StructureModifier getStringArrays() { + return structureModifier.withType(String[].class); + } + + /** + * Retrieves a read/write structure for every byte array field. + * @return A modifier for every byte array field. + */ + public StructureModifier getByteArrays() { + return structureModifier.withType(byte[].class); + } + /** * Retrieves a read/write structure for ItemStack. *