Interface INetworkInstance
public interface INetworkInstance
To hold information about network
use this interface if you want to do something completely different
-
Method Summary
Modifier and TypeMethodDescriptionstatic EmotePacket.BuildercreateConfigPacket(boolean isTrackingPlayState) default EmotePacket.BuildercreateConfigurationPacket(boolean allowTracking) Client is sending config message to server.voidWhen the network instance disconnects...Get the version from the other side.booleanisActive()Is the other side is available your send won't be invoke if you return falsedefault booleanDoes the other side track the emote play state of every player -> true The client has to resend the emote if a new player get close -> falsedefault intMaximum size of the data what the instance can sendvoidsendMessage(EmotePacket.Builder builder, boolean updateVersions) The Proxy controller ask you to send the message, only ifisActive()is truedefault voidsendMessage(NetData data, boolean updateVersions) default voidsetVersions(Map<Byte, Byte> map) Receive (and save) versions from the other side
-
Method Details
-
getVersions
-
setVersions
-
disconnect
void disconnect()When the network instance disconnects... -
sendMessage
-
sendMessage
The Proxy controller ask you to send the message, only ifisActive()is true- Parameters:
builder- packet builder
-
createConfigurationPacket
Client is sending config message to server. Vanilla clients will answer to the server configuration phase message. This might get invoked multiple times on the same network instance. -
createConfigPacket
-
isActive
boolean isActive()Is the other side is available your send won't be invoke if you return false- Returns:
- is this channel working
-
isTrackingPlayState
default boolean isTrackingPlayState()Does the other side track the emote play state of every player -> true The client has to resend the emote if a new player get close -> false -
maxDataSize
default int maxDataSize()Maximum size of the data what the instance can sendDefaults to
CommonData.MAX_PACKET_SIZE- Returns:
- max size of bytes[]
-