public class PacketContent extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PacketContent.ContentModifier<T> |
Constructor and Description |
---|
PacketContent(AbstractPacket packet)
Create a PacketContent to easily read and write value in it
|
PacketContent(Object obj)
Create a PacketContent to easily read and write to the specified object
|
Modifier and Type | Method and Description |
---|---|
PacketContent.ContentModifier<Object> |
getAllObjects()
Get content modifier of all object, ignoring type
|
PacketContent.ContentModifier<Boolean> |
getBooleans()
Get content modifier of all booleans
|
PacketContent.ContentModifier<byte[]> |
getByteArrays()
Get content modifier of all byte arrays
|
PacketContent.ContentModifier<Byte> |
getBytes()
Get content modifier of all bytes
|
PacketContent.ContentModifier<Double> |
getDoubles()
Get content modifier of all double
|
PacketContent.ContentModifier<Float> |
getFloats()
Get content modifier of all float
|
PacketContent.ContentModifier<Integer> |
getIntegers()
Get content modifier of all integers
|
PacketContent.ContentModifier<Long> |
getLongs()
Get content modifier of all long
|
@Nullable AbstractPacket |
getPacket()
Get the packet where the packet content come from.
|
<T> PacketContent.ContentModifier<T> |
getSpecificModifier(Class<T> clazz)
Get content modifier of a custom type
|
<T> PacketContent.ContentModifier<T> |
getSpecificModifier(T type)
Get content modifier of a custom type
|
PacketContent.ContentModifier<String> |
getStrings()
Get content modifier of all string
|
public PacketContent(AbstractPacket packet)
packet
- the Negativity's packetpublic PacketContent(Object obj)
obj
- the object that will be read or editpublic @Nullable AbstractPacket getPacket()
public <T> PacketContent.ContentModifier<T> getSpecificModifier(T type)
type
- the searched typepublic <T> PacketContent.ContentModifier<T> getSpecificModifier(Class<T> clazz)
clazz
- the searched typepublic PacketContent.ContentModifier<String> getStrings()
public PacketContent.ContentModifier<Byte> getBytes()
public PacketContent.ContentModifier<Boolean> getBooleans()
public PacketContent.ContentModifier<Integer> getIntegers()
public PacketContent.ContentModifier<byte[]> getByteArrays()
public PacketContent.ContentModifier<Long> getLongs()
public PacketContent.ContentModifier<Float> getFloats()
public PacketContent.ContentModifier<Double> getDoubles()
public PacketContent.ContentModifier<Object> getAllObjects()