public class Protocol1_9TO1_8 extends Protocol
Modifier and Type | Field and Description |
---|---|
static ValueTransformer<String,String> |
FIX_JSON |
Constructor and Description |
---|
Protocol1_9TO1_8() |
Modifier and Type | Method and Description |
---|---|
protected void |
filterPacket(UserConnection info,
Object packet,
List output)
Filter a packet into the output
|
static String |
fixJson(String line) |
static Item |
getHandItem(UserConnection info) |
void |
init(UserConnection userConnection)
Initialise a user for this protocol setting up objects.
|
boolean |
isFiltered(Class packetClass)
Should this protocol filter an object packet from this class.
|
static boolean |
isSword(int id) |
protected void |
register(ViaProviders providers)
Handle protocol registration phase, use this to register providers / tasks.
|
protected void |
registerPackets()
Register the packets for this protocol
|
registerIncoming, registerIncoming, registerIncoming, registerListeners, registerOutgoing, registerOutgoing, registerOutgoing, toString, transform
public static final ValueTransformer<String,String> FIX_JSON
public static Item getHandItem(UserConnection info)
public static boolean isSword(int id)
protected void registerPackets()
Protocol
registerPackets
in class Protocol
protected void register(ViaProviders providers)
Protocol
public boolean isFiltered(Class packetClass)
Protocol
isFiltered
in class Protocol
packetClass
- The class of the current inputprotected void filterPacket(UserConnection info, Object packet, List output) throws Exception
Protocol
filterPacket
in class Protocol
info
- The current user connectionpacket
- The input packet as an object (NMS)output
- The list to put the object into.Exception
- Throws exception if cancelled / error.public void init(UserConnection userConnection)
Protocol
UserConnection
Copyright © 2016–2019. All rights reserved.