public class PacketPlayerMove extends java.lang.Object implements Packet
Modifier and Type | Class and Description |
---|---|
static class |
PacketPlayerMove.MoveType
Player move types.
|
Modifier and Type | Field and Description |
---|---|
private PlayerProxy |
player
The player that made the move.
|
private static long |
serialVersionUID
Serial ID.
|
private int |
source
The source object involved (the ID of the claimed
object or the ID of the object a merge started from).
|
private int |
target
The ID of the target object of a merge move.
|
private PacketPlayerMove.MoveType |
type
The type of move.
|
Modifier | Constructor and Description |
---|---|
|
PacketPlayerMove()
Constructs a new player move no more remaining moves
being available to the player.
|
|
PacketPlayerMove(Player player,
ConvexObject claimed)
Constructs a new player move packet for a claim with the given data.
|
|
PacketPlayerMove(Player player,
ConvexObject source,
ConvexObject target)
Constructs a new player move packet for a merge with the given data.
|
private |
PacketPlayerMove(Player player,
ConvexObject source,
ConvexObject target,
PacketPlayerMove.MoveType type)
Constructs a new player move packet with the given data.
|
Modifier and Type | Method and Description |
---|---|
PlayerProxy |
getPlayer()
Gets the player that made this move.
|
PacketRegistry |
getRegisteryType()
The registry type of this packet.
|
int |
getSource()
Gets the ID of the source object in this move.
|
int |
getTarget()
Gets the ID of the target object in this move.
|
PacketPlayerMove.MoveType |
getType()
Gets the type of move that was made by the player.
|
private static final long serialVersionUID
private final PlayerProxy player
private final PacketPlayerMove.MoveType type
private final int source
private final int target
public PacketPlayerMove()
public PacketPlayerMove(Player player, ConvexObject claimed)
player
- The player that made the move.claimed
- The object that was claimed.public PacketPlayerMove(Player player, ConvexObject source, ConvexObject target)
player
- The player that made the move.source
- The source object the merge started from.target
- The merge target object.private PacketPlayerMove(Player player, ConvexObject source, ConvexObject target, PacketPlayerMove.MoveType type)
player
- The player that made the move.source
- The source object involved (claimed object
or object a merge started from).target
- The merge target object.type
- The type of the move.public PlayerProxy getPlayer()
public PacketPlayerMove.MoveType getType()
public int getSource()
public int getTarget()
public PacketRegistry getRegisteryType()
Packet
getRegisteryType
in interface Packet