Class SetPacket
java.lang.Object
dev.koifysh.archipelago.network.APPacket
dev.koifysh.archipelago.network.client.SetPacket
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA List of operations that can be performed on the value stored on the server.
SetPacket.Operation.REPLACE,SetPacket.Operation.DEFAULT,SetPacket.Operation.ADD,SetPacket.Operation.MULTIPLY,SetPacket.Operation.POWER,SetPacket.Operation.MODULO,SetPacket.Operation.MAX,SetPacket.Operation.MIN,SetPacket.Operation.AND,SetPacket.Operation.OR,SetPacket.Operation.XOR,SetPacket.Operation.LEFT_SHIFT,SetPacket.Operation.RIGHT_SHIFT,SetPacket.Operation.REMOVE,SetPacket.Operation.POP,SetPacket.Operation.UPDATE -
Field Summary
FieldsModifier and TypeFieldDescriptionThe default value to use in case the key has no value on the server.The key to manipulate.ArrayList<dev.koifysh.archipelago.network.client.SetPacket.DataStorageOperation>Operations to apply to the value on the server, multiple operations can be present, and they will be executed in order of appearance.booleanIf true, the server will send aSetReplyEventresponse back to the client. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataStorageOperation(SetPacket.Operation operation, Object value) adds aSetPacket.DataStorageOperationto be performed to the value on the server, these are applied in the order that you add them.int
-
Field Details
-
key
The key to manipulate. Can never start with "_read". -
defaultValue
The default value to use in case the key has no value on the server. -
want_reply
@SerializedName("want_reply") public boolean want_replyIf true, the server will send aSetReplyEventresponse back to the client. -
operations
@SerializedName("operations") public ArrayList<dev.koifysh.archipelago.network.client.SetPacket.DataStorageOperation> operationsOperations to apply to the value on the server, multiple operations can be present, and they will be executed in order of appearance.
-
-
Constructor Details
-
SetPacket
-
-
Method Details
-
addDataStorageOperation
adds aSetPacket.DataStorageOperationto be performed to the value on the server, these are applied in the order that you add them.- Parameters:
operation-SetPacket.Operationto applyvalue- a `value` for use with theSetPacket.Operation
-
getRequestID
public int getRequestID()
-