@FunctionalInterface public interface PacketHandler extends ValueWriter
Modifier and Type | Method and Description |
---|---|
void |
handle(PacketWrapper wrapper)
Handle a packet
|
default void |
write(PacketWrapper writer,
Object inputValue)
Write a value to a packet
|
void handle(PacketWrapper wrapper) throws Exception
wrapper
- The associated wrapperException
- Throws exception if it failed to handle the packetdefault void write(PacketWrapper writer, Object inputValue) throws Exception
ValueWriter
write
in interface ValueWriter
writer
- The packet wrapper to write toinputValue
- The value to writeException
- Throws exception if it fails to writeCopyright © 2016–2021. All rights reserved.