mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-12-26 19:18:12 +01:00
Add getIntegers(), getLongs(), ect. to PacketContainer.
This commit is contained in:
parent
528468a342
commit
7f5288dea6
@ -123,6 +123,61 @@ public class PacketContainer implements Serializable {
|
||||
return structureModifier.withType(primitiveType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for every byte field.
|
||||
* @return A modifier for every byte field.
|
||||
*/
|
||||
public StructureModifier<Byte> getBytes() {
|
||||
return structureModifier.withType(byte.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for every short field.
|
||||
* @return A modifier for every short field.
|
||||
*/
|
||||
public StructureModifier<Short> getShorts() {
|
||||
return structureModifier.withType(short.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for every integer field.
|
||||
* @return A modifier for every integer field.
|
||||
*/
|
||||
public StructureModifier<Integer> getIntegers() {
|
||||
return structureModifier.withType(int.class);
|
||||
}
|
||||
/**
|
||||
* Retrieves a read/write structure for every long field.
|
||||
* @return A modifier for every long field.
|
||||
*/
|
||||
public StructureModifier<Long> getLongs() {
|
||||
return structureModifier.withType(long.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for every float field.
|
||||
* @return A modifier for every float field.
|
||||
*/
|
||||
public StructureModifier<Float> getFloat() {
|
||||
return structureModifier.withType(float.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for every double field.
|
||||
* @return A modifier for every double field.
|
||||
*/
|
||||
public StructureModifier<Double> getDoubles() {
|
||||
return structureModifier.withType(double.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for every String field.
|
||||
* @return A modifier for every String field.
|
||||
*/
|
||||
public StructureModifier<String> getStrings() {
|
||||
return structureModifier.withType(String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for ItemStack.
|
||||
* <p>
|
||||
|
Loading…
Reference in New Issue
Block a user