Class AbstractStructure
- Direct Known Subclasses:
InternalStructure,PacketContainer
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractStructure(Object handle, StructureModifier<Object> modifier) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a read/write structure for collections of attribute snapshots.Retrieves a read/write structure for BlockData in Minecraft 1.8.Retrieves a read/write structure for IBlockData arrays in Minecraft 1.16.2+Retrieves a read/write structure for BlockEntityType.Retrieves a read/write structure for collections of chunk positions.Retrieves a read/write structure for block positions.StructureModifier<org.bukkit.Material> Retrieves a read/write structure for block fields.Retrieves a read/write structure for every boolean field.StructureModifier<byte[]> Retrieves a read/write structure for every byte array field.Retrieve a serializer for reading and writing ItemStacks stored in a byte array.getBytes()Retrieves a read/write structure for every byte field.Retrieves a read/write structure for arrays of chat components.Retrieves a read/write structure for chat components in Minecraft 1.7.2.Retrieve a read/write structure for the ChatFormatting enum.Retrieve a read/write structure for the ChatType enum in 1.12.Retrieve a read/write structure for the ChatVisibility enum in 1.7.2.Retrieves a read/write structure for wrapped ChunkCoordIntPairs.Retrieve a read/write structure for the ClientCommand enum in 1.7.2.Retrieve a read/write structure for the ClientIntent enum used in Handshake/SetProtocol packetRetrieve a read/write structure for the CombatEventType enum in 1.8.Retrieve a read/write structure for custom packet payloads (available since Minecraft 1.20.2).Retrieves a read/write structure for collections of data values for Minecraft 1.19.3 or later.Retrieves a read/write structure for data watchers.Retrieve a read/write structure for the Difficulty enum in 1.7.2.Deprecated.StructureModifier<org.bukkit.World> Retrieve a read/write structure for the Direction enum in 1.10.Retrieve a read/write structure for the DisplaySlot enum in 1.20.2.Retrieves a read/write structure for every double field.StructureModifier<org.bukkit.potion.PotionEffectType> Retrieve a read/write structure for the MobEffectList class in 1.9.<L,R> StructureModifier <Either<L, R>> getEithers(EquivalentConverter<L> leftConverter, EquivalentConverter<R> rightConverter) StructureModifier<org.bukkit.entity.Entity> getEntityModifier(PacketEvent event) Retrieves a read/write structure for entity objects.StructureModifier<org.bukkit.entity.Entity> getEntityModifier(org.bukkit.World world) Retrieves a read/write structure for entity objects.StructureModifier<org.bukkit.entity.EntityType> Retrieves a read/write structure for entity typesRetrieve a read/write structure for the EntityUse enum in 1.7.2.Retrieves a read/write structure for the EntityUseAction class in the UseEntity packet sent by the client for 1.17 and above.<T extends Enum<T>>
StructureModifier<T> getEnumModifier(Class<T> enumClass, int index) Retrieve a read/write structure for an enum.<T extends Enum<T>>
StructureModifier<T> getEnumModifier(Class<T> enumClass, Class<?> nmsClass) Retrieve a read/write structure for an enum.getFloat()Retrieves a read/write structure for every float field.Retrieve a read/write structure for the NativeGameMode enum in 1.7.2.Retrieves a read/write structure for game profiles in Minecraft 1.7.2.Retrieve a read/write structure for Game State IDs in 1.16+getHands()Retrieve a read/write structure for the Hand enum in 1.9.<T> StructureModifier<T> getHolders(Class<?> genericType, EquivalentConverter<T> converter) Retrieve a read/write structure for a Holder<T> in 1.19.3.Retrieve a read/write structure for Instants in (mostly for use in 1.19+)StructureModifier<int[]> Retrieves a read/write structure for every int array field.Retrieves a read/write structure for every integer field.StructureModifier<org.bukkit.inventory.ItemStack[]> Retrieves a read/write structure for arrays of ItemStacks.StructureModifier<List<org.bukkit.inventory.ItemStack>> Retrieves a read/write structure for lists of ItemStacks.StructureModifier<org.bukkit.inventory.ItemStack> Retrieves a read/write structure for ItemStack.Retrieve a read/write structure for the ItemSlot enum in 1.9.Retrieve a read/write structure for LevelChunkPacketData in 1.18+Retrieve a read/write structure for LightUpdatePacketData in 1.18+StructureModifier<List<NbtBase<?>>> Retrieves a read/write structure for lists of NBT classes.<E> StructureModifier<List<E>> getLists(EquivalentConverter<E> converter) Retrieve a read/write structure for the List class.getLongs()Retrieves a read/write structure for every long field.<K,V> StructureModifier <Map<K, V>> getMaps(EquivalentConverter<K> keyConverter, EquivalentConverter<V> valConverter) Retrieve a read/write structure for the Map class.StructureModifier<List<org.bukkit.inventory.MerchantRecipe>> Retrieve a read/write structure for the MerchantRecipeList class.Retrieve a read/write structure for the MinecraftKey class.Retrieve a read/write structure for MovingObjectPositionBlock in 1.16+Retrieves a read/write structure for MultiBlockChangeInfo arrays in Minecraft 1.8.Retrieves a read/write structure for NBT classes.Retrieve a read/write structure for ParticleParams in 1.13Retrieve a read/write structure for the NumberFormat class in 1.20.4+.<T> StructureModifier<Optional<T>> getOptionals(EquivalentConverter<T> converter) Retrieve a read/write structure for an optional, passing the value of the optional field through the given converter if present.Retrieve a read/write structure for optional team parameters in 1.17+.Retrieve a read/write structure for the Particle enum in 1.8-1.12.Retrieve a read/write structure for the PlayerAction enum in 1.8.Retrieve a read/write structure for the PlayerDigType enum in 1.8.Retrieve a read/write structure for the PlayerInfo enum in 1.8.Retrieve a read/write structure for an EnumSet of PlayerInfos.Retrieve a read/write structure for the PlayerInfoData list fields in the following packet:
PacketType.Play.Server.PLAYER_INFORetrieve a read/write structure for profile public key data in 1.19Retrieve a read/write structure for profile public keys in 1.19Retrieve a read/write structure for the Protocol enum in 1.7.2.getRegistrableModifier(@NotNull Class<?> registrableClass) Retrieves a read/write structure for registrable objects.Retrieves read/write structure for remote chat session data in 1.19.3Retrieve a read/write structure for the RenderType enum.Retrieve a read/write structure for the ResourcePackStatus enum in 1.8.Retrieve a read/write structure for the ScoreboardAction enum in 1.8.Retrieve a read/write structure for SectionPositions in 1.16.2+Retrieve a read/write structure for the ServerPing fields in the following packet:
PacketType.Status.Server.SERVER_INFO<E> StructureModifier<Set<E>> getSets(EquivalentConverter<E> converter) Retrieve a read/write structure for the Set class.StructureModifier<short[]> Retrieves a read/write structure for every short array field.Retrieves a read/write structure for every short field.StructureModifier<List<Pair<EnumWrappers.ItemSlot, org.bukkit.inventory.ItemStack>>> Retrieve a read/write structure for ItemSlot/ItemStack pair lists in 1.16+Retrieve a read/write structure for the SoundCategory enum in 1.9.StructureModifier<org.bukkit.Sound> Retrieve a read/write structure for the SoundEffect enum in 1.9.<T> StructureModifier<T> getSpecificModifier(Class<T> primitiveType) Retrieves a read/write structure for every field with the given type.Retrieve a read/write structure for maps of statistics.Retrieves a read/write structure for every String array field.Retrieves a read/write structure for every String field.Retrieve a read/write structure for the TitleAction enum in 1.8.getUUIDs()Retrieves a read/write structure for every UUID field.StructureModifier<org.bukkit.util.Vector> Retrieves a read/write structure for Vectors.Retrieves a read/write structure for collections of watchable objects before Minecraft 1.19.3.Retrieve a read/write structure for the WorldBorderAction enum in 1.8.StructureModifier<org.bukkit.World> Retrieve a read/write structure for World ResourceKeys in 1.16+StructureModifier<org.bukkit.WorldType> Retrieves a read/write structure for the world type enum.
-
Field Details
-
handle
-
structureModifier
-
-
Constructor Details
-
AbstractStructure
protected AbstractStructure() -
AbstractStructure
-
-
Method Details
-
getHandle
-
getModifier
-
getSpecificModifier
Retrieves a read/write structure for every field with the given type.- Type Parameters:
T- Type- Parameters:
primitiveType- - the type to find.- Returns:
- A modifier for this specific type.
-
getBytes
Retrieves a read/write structure for every byte field.- Returns:
- A modifier for every byte field.
-
getBooleans
Retrieves a read/write structure for every boolean field.- Returns:
- A modifier for every boolean field.
-
getShorts
Retrieves a read/write structure for every short field.- Returns:
- A modifier for every short field.
-
getIntegers
Retrieves a read/write structure for every integer field.- Returns:
- A modifier for every integer field.
-
getLongs
Retrieves a read/write structure for every long field.- Returns:
- A modifier for every long field.
-
getFloat
Retrieves a read/write structure for every float field.- Returns:
- A modifier for every float field.
-
getDoubles
Retrieves a read/write structure for every double field.- Returns:
- A modifier for every double field.
-
getStrings
Retrieves a read/write structure for every String field.- Returns:
- A modifier for every String field.
-
getUUIDs
Retrieves a read/write structure for every UUID field.- Returns:
- A modifier for every UUID field.
-
getStringArrays
Retrieves a read/write structure for every String array field.- Returns:
- A modifier for every String array field.
-
getByteArrays
Retrieves a read/write structure for every byte array field.- Returns:
- A modifier for every byte array field.
-
getByteArraySerializer
Retrieve a serializer for reading and writing ItemStacks stored in a byte array.- Returns:
- A instance of the serializer.
-
getIntegerArrays
Retrieves a read/write structure for every int array field.- Returns:
- A modifier for every int array field.
-
getShortArrays
Retrieves a read/write structure for every short array field.- Returns:
- A modifier for every short array field.
-
getItemModifier
Retrieves a read/write structure for ItemStack.This modifier will automatically marshal between the Bukkit ItemStack and the internal Minecraft ItemStack.
- Returns:
- A modifier for ItemStack fields.
-
getItemArrayModifier
Retrieves a read/write structure for arrays of ItemStacks.This modifier will automatically marshal between the Bukkit ItemStack and the internal Minecraft ItemStack.
- Returns:
- A modifier for ItemStack array fields.
-
getItemListModifier
Retrieves a read/write structure for lists of ItemStacks.This modifier will automatically marshal between the Bukkit ItemStack and the internal Minecraft ItemStack.
- Returns:
- A modifier for ItemStack list fields.
-
getStatisticMaps
Retrieve a read/write structure for maps of statistics.Note that you must write back the changed map to persist it.
- Returns:
- A modifier for maps of statistics.
-
getWorldTypeModifier
Retrieves a read/write structure for the world type enum.This modifier will automatically marshal between the Bukkit world type and the internal Minecraft world type.
- Returns:
- A modifier for world type fields.
-
getDataWatcherModifier
Retrieves a read/write structure for data watchers.- Returns:
- A modifier for data watchers.
-
getEntityModifier
public StructureModifier<org.bukkit.entity.Entity> getEntityModifier(@Nonnull org.bukkit.World world) Retrieves a read/write structure for entity objects.Note that entities are transmitted by integer ID, and the type may not be enough to distinguish between entities and other values. Thus, this structure modifier MAY return null or invalid entities for certain fields. Using the correct index is essential.
- Parameters:
world- - the world each entity is currently occupying.- Returns:
- A modifier entity types.
-
getEntityModifier
Retrieves a read/write structure for entity objects.Note that entities are transmitted by integer ID, and the type may not be enough to distinguish between entities and other values. Thus, this structure modifier MAY return null or invalid entities for certain fields. Using the correct index is essential.
- Parameters:
event- - the original packet event.- Returns:
- A modifier entity types.
-
getEntityTypeModifier
Retrieves a read/write structure for entity types- Returns:
- A modifier for an EntityType.
-
getBlockPositionModifier
Retrieves a read/write structure for block positions.- Returns:
- A modifier for a BlockPosition.
-
getRegistrableModifier
public StructureModifier<WrappedRegistrable> getRegistrableModifier(@NotNull @NotNull Class<?> registrableClass) Retrieves a read/write structure for registrable objects.- Parameters:
registrableClass- The registrable object's class.- Returns:
- A modifier for a registrable objects.
- See Also:
-
getBlockEntityTypeModifier
Retrieves a read/write structure for BlockEntityType.- Returns:
- A modifier for a BlockEntityType.
-
getChunkCoordIntPairs
Retrieves a read/write structure for wrapped ChunkCoordIntPairs.- Returns:
- A modifier for ChunkCoordIntPair.
-
getNbtModifier
Retrieves a read/write structure for NBT classes.- Returns:
- A modifier for NBT classes.
-
getListNbtModifier
Retrieves a read/write structure for lists of NBT classes.- Returns:
- A modifier for lists of NBT classes.
-
getVectors
Retrieves a read/write structure for Vectors.- Returns:
- A modifier for Vectors.
-
getAttributeCollectionModifier
Retrieves a read/write structure for collections of attribute snapshots.This modifier will automatically marshal between the visible ProtocolLib WrappedAttribute and the internal Minecraft AttributeSnapshot.
- Returns:
- A modifier for AttributeSnapshot collection fields.
-
getBlockPositionCollectionModifier
Retrieves a read/write structure for collections of chunk positions.This modifier will automatically marshal between the visible ProtocolLib BlockPosition and the internal Minecraft BlockPosition.
- Returns:
- A modifier for ChunkPosition list fields.
-
getWatchableCollectionModifier
Retrieves a read/write structure for collections of watchable objects before Minecraft 1.19.3.This modifier will automatically marshal between the visible WrappedWatchableObject and the internal Minecraft WatchableObject.
- Returns:
- A modifier for watchable object list fields.
-
getDataValueCollectionModifier
Retrieves a read/write structure for collections of data values for Minecraft 1.19.3 or later.- Returns:
- A modifier for data values.
-
getBlocks
Retrieves a read/write structure for block fields.This modifier will automatically marshal between Material and the internal Minecraft Block.
- Returns:
- A modifier for GameProfile fields.
-
getGameProfiles
Retrieves a read/write structure for game profiles in Minecraft 1.7.2.This modifier will automatically marshal between WrappedGameProfile and the internal Minecraft GameProfile.
- Returns:
- A modifier for GameProfile fields.
-
getBlockData
Retrieves a read/write structure for BlockData in Minecraft 1.8.This modifier will automatically marshal between WrappedBlockData and the internal Minecraft IBlockData.
- Returns:
- A modifier for BlockData fields.
-
getBlockDataArrays
Retrieves a read/write structure for IBlockData arrays in Minecraft 1.16.2+- Returns:
- A modifier for IBlockData array fields
-
getMultiBlockChangeInfoArrays
Retrieves a read/write structure for MultiBlockChangeInfo arrays in Minecraft 1.8.This modifier will automatically marshal between MultiBlockChangeInfo and the internal Minecraft MultiBlockChangeInfo.
- Returns:
- A modifier for BlockData fields.
-
getChatComponents
Retrieves a read/write structure for chat components in Minecraft 1.7.2.This modifier will automatically marshal between WrappedChatComponent and the internal Minecraft IChatBaseComponent.
- Returns:
- A modifier for ChatComponent fields.
-
getChatComponentArrays
Retrieves a read/write structure for arrays of chat components.This modifier will automatically marshal between WrappedChatComponent and the internal Minecraft IChatBaseComponent (1.9.2 and below) or the internal NBTCompound (1.9.4 and up).
Note that in 1.9.4 and up this modifier only works properly with sign tile entities.
- Returns:
- A modifier for ChatComponent array fields.
-
getServerPings
Retrieve a read/write structure for the ServerPing fields in the following packet:
- Returns:
- A modifier for ServerPing fields.
-
getPlayerInfoDataLists
Retrieve a read/write structure for the PlayerInfoData list fields in the following packet:
- Returns:
- A modifier for PlayerInfoData list fields.
-
getProtocols
Retrieve a read/write structure for the Protocol enum in 1.7.2.- Returns:
- A modifier for Protocol enum fields.
-
getClientCommands
Retrieve a read/write structure for the ClientCommand enum in 1.7.2.- Returns:
- A modifier for ClientCommand enum fields.
-
getChatVisibilities
Retrieve a read/write structure for the ChatVisibility enum in 1.7.2.- Returns:
- A modifier for ChatVisibility enum fields.
-
getDifficulties
Retrieve a read/write structure for the Difficulty enum in 1.7.2.- Returns:
- A modifier for Difficulty enum fields.
-
getEntityUseActions
Retrieve a read/write structure for the EntityUse enum in 1.7.2.- Returns:
- A modifier for EntityUse enum fields.
-
getEnumEntityUseActions
Retrieves a read/write structure for the EntityUseAction class in the UseEntity packet sent by the client for 1.17 and above.- Returns:
- A modifier for EntityUseAction class fields.
-
getGameModes
Retrieve a read/write structure for the NativeGameMode enum in 1.7.2.- Returns:
- A modifier for NativeGameMode enum fields.
-
getResourcePackStatus
Retrieve a read/write structure for the ResourcePackStatus enum in 1.8.- Returns:
- A modifier for ResourcePackStatus enum fields.
-
getPlayerInfoAction
Retrieve a read/write structure for the PlayerInfo enum in 1.8.- Returns:
- A modifier for PlayerInfoAction enum fields.
-
getPlayerInfoActions
Retrieve a read/write structure for an EnumSet of PlayerInfos.- Returns:
- A modifier for an EnumSet of PlayerInfo fields.
-
getTitleActions
Retrieve a read/write structure for the TitleAction enum in 1.8.- Returns:
- A modifier for TitleAction enum fields.
-
getWorldBorderActions
Retrieve a read/write structure for the WorldBorderAction enum in 1.8.- Returns:
- A modifier for WorldBorderAction enum fields.
-
getCombatEvents
Retrieve a read/write structure for the CombatEventType enum in 1.8.- Returns:
- A modifier for CombatEventType enum fields.
-
getPlayerDigTypes
Retrieve a read/write structure for the PlayerDigType enum in 1.8.- Returns:
- A modifier for PlayerDigType enum fields.
-
getPlayerActions
Retrieve a read/write structure for the PlayerAction enum in 1.8.- Returns:
- A modifier for PlayerAction enum fields.
-
getScoreboardActions
Retrieve a read/write structure for the ScoreboardAction enum in 1.8.- Returns:
- A modifier for ScoreboardAction enum fields.
-
getParticles
Retrieve a read/write structure for the Particle enum in 1.8-1.12. NOTE: This will produce undesirable results in 1.13- Returns:
- A modifier for Particle enum fields.
-
getNewParticles
Retrieve a read/write structure for ParticleParams in 1.13- Returns:
- A modifier for ParticleParam fields.
-
getEffectTypes
Retrieve a read/write structure for the MobEffectList class in 1.9.- Returns:
- A modifier for MobEffectList fields.
-
getSoundCategories
Retrieve a read/write structure for the SoundCategory enum in 1.9.- Returns:
- A modifier for SoundCategory enum fields.
-
getHolders
Retrieve a read/write structure for a Holder<T> in 1.19.3.- Type Parameters:
T- Bukkit type- Parameters:
genericType- NMS type of Tconverter- Converter from genericType to T- Returns:
- A modifier for Holder fields
-
getSoundEffects
Retrieve a read/write structure for the SoundEffect enum in 1.9.- Returns:
- A modifier for SoundEffect enum fields.
-
getItemSlots
Retrieve a read/write structure for the ItemSlot enum in 1.9.- Returns:
- A modifier for ItemSlot enum fields.
-
getHands
Retrieve a read/write structure for the Hand enum in 1.9.- Returns:
- A modifier for Hand enum fields.
-
getDirections
Retrieve a read/write structure for the Direction enum in 1.10.- Returns:
- A modifier for Direction enum fields.
-
getChatTypes
Retrieve a read/write structure for the ChatType enum in 1.12.- Returns:
- A modifier for ChatType enum fields.
-
getDisplaySlots
Retrieve a read/write structure for the DisplaySlot enum in 1.20.2.- Returns:
- A modifier for DisplaySlot enum fields.
-
getRenderTypes
Retrieve a read/write structure for the RenderType enum.- Returns:
- A modifier for RenderType enum fields.
-
getChatFormattings
Retrieve a read/write structure for the ChatFormatting enum.- Returns:
- A modifier for ChatFormatting enum fields.
-
getOptionalTeamParameters
Retrieve a read/write structure for optional team parameters in 1.17+.- Returns:
- A modifier for optional team parameters fields.
-
getNumberFormats
Retrieve a read/write structure for the NumberFormat class in 1.20.4+.- Returns:
- A modifier for NumberFormat fields.
-
getMinecraftKeys
Retrieve a read/write structure for the MinecraftKey class.- Returns:
- A modifier for MinecraftKey fields.
-
getCustomPacketPayloads
Retrieve a read/write structure for custom packet payloads (available since Minecraft 1.20.2).- Returns:
- A modifier for CustomPacketPayloads fields.
-
getDimensions
Deprecated.Retrieve a read/write structure for dimension IDs in 1.13.1+- Returns:
- A modifier for dimension IDs
-
getDimensionTypes
-
getMerchantRecipeLists
Retrieve a read/write structure for the MerchantRecipeList class.- Returns:
- A modifier for MerchantRecipeList fields.
-
getSlotStackPairLists
public StructureModifier<List<Pair<EnumWrappers.ItemSlot,org.bukkit.inventory.ItemStack>>> getSlotStackPairLists()Retrieve a read/write structure for ItemSlot/ItemStack pair lists in 1.16+- Returns:
- The Structure Modifier
-
getMovingBlockPositions
Retrieve a read/write structure for MovingObjectPositionBlock in 1.16+- Returns:
- The Structure Modifier
-
getWorldKeys
Retrieve a read/write structure for World ResourceKeys in 1.16+- Returns:
- The Structure Modifier
-
getSectionPositions
Retrieve a read/write structure for SectionPositions in 1.16.2+- Returns:
- The Structure Modifier
-
getGameStateIDs
Retrieve a read/write structure for Game State IDs in 1.16+- Returns:
- The Structure Modifier
-
getIntLists
-
getUUIDLists
-
getInstants
Retrieve a read/write structure for Instants in (mostly for use in 1.19+)- Returns:
- The Structure Modifier
-
getProfilePublicKeys
Retrieve a read/write structure for profile public keys in 1.19- Returns:
- The Structure Modifier
-
getProfilePublicKeyData
Retrieve a read/write structure for profile public key data in 1.19- Returns:
- The Structure Modifier
-
getRemoteChatSessionData
Retrieves read/write structure for remote chat session data in 1.19.3- Returns:
- The Structure Modifier
-
getLevelChunkData
Retrieve a read/write structure for LevelChunkPacketData in 1.18+- Returns:
- The Structure Modifier
-
getLightUpdateData
Retrieve a read/write structure for LightUpdatePacketData in 1.18+- Returns:
- The Structure Modifier
-
getLoginSignatures
- Returns:
- read/write structure for login encryption packets
-
getSignatures
- Returns:
- read/writer structure direct access to salted signature data like chat messages
-
getMessageSignatures
- Returns:
- read/writer structure direct access to unsalted signature data for example in chat message (since 1.19.3)
-
getClientIntents
Retrieve a read/write structure for the ClientIntent enum used in Handshake/SetProtocol packet- Returns:
- A modifier for Protocol enum fields.
-
getEithers
public <L,R> StructureModifier<Either<L,R>> getEithers(EquivalentConverter<L> leftConverter, EquivalentConverter<R> rightConverter) - Type Parameters:
L- left data type after converting from NMSR- right data type after converting from NMS- Parameters:
leftConverter- converter for left valuesrightConverter- converter for right values- Returns:
- ProtocolLib's read/write structure for Mojang either structures
-
getMaps
public <K,V> StructureModifier<Map<K,V>> getMaps(EquivalentConverter<K> keyConverter, EquivalentConverter<V> valConverter) Retrieve a read/write structure for the Map class.- Type Parameters:
K- Key paramV- Value param- Parameters:
keyConverter- Converter for map keysvalConverter- Converter for map values- Returns:
- A modifier for Map fields.
- See Also:
-
getSets
Retrieve a read/write structure for the Set class.- Type Parameters:
E- Element param- Parameters:
converter- Converter for elements- Returns:
- A modifier for Set fields
- See Also:
-
getLists
Retrieve a read/write structure for the List class.- Type Parameters:
E- Element param- Parameters:
converter- Converter for elements- Returns:
- A modifier for List fields
-
getEnumModifier
public <T extends Enum<T>> StructureModifier<T> getEnumModifier(Class<T> enumClass, Class<?> nmsClass) Retrieve a read/write structure for an enum. This allows for the use of user-created enums that may not exist in ProtocolLib. The specific (user created) enum constants must match up perfectly with their generic (NMS) counterparts.- Parameters:
enumClass- The specific Enum classnmsClass- The generic Enum class- Returns:
- The modifier
-
getEnumModifier
Retrieve a read/write structure for an enum. This method is for convenience, seegetEnumModifier(Class, Class)for more information.- Parameters:
enumClass- The specific Enum classindex- Index of the generic Enum- Returns:
- The modifier
- See Also:
-
getOptionals
Retrieve a read/write structure for an optional, passing the value of the optional field through the given converter if present.- Type Parameters:
T- The inner type of the optional- Parameters:
converter- Converter for internal element of optional, if present- Returns:
- The modifier
-
getPacketBundles
-