Package mindustry.net
Class Administration.PlayerAction
java.lang.Object
mindustry.net.Administration.PlayerAction
- All Implemented Interfaces:
Pool.Poolable
- Enclosing class:
- Administration
Defines a (potentially dangerous) action that a player has done in the world.
These objects are pooled; do not cache them!
-
Field Summary
Modifier and TypeFieldDescriptionvalid for block placement events onlyint[]
valid only for command building eventsvalid for configure and rotation-type events only.valid for item-type events only.int
valid only for payload eventsint[]
valid only for removePlanned events only; contains packed positions.mindustry.gen.Player
int
mindustry.gen.Unit
valid for unit-type events only, and even in that case may be null.int[]
valid only for command unit events -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
reset()
Resets the object for reuse.set
(mindustry.gen.Player player, Administration.ActionType type, mindustry.gen.Unit unit) set
(mindustry.gen.Player player, Administration.ActionType type, Tile tile)
-
Field Details
-
player
public mindustry.gen.Player player -
type
-
tile
-
block
valid for block placement events only -
rotation
public int rotation -
config
valid for configure and rotation-type events only. -
item
valid for item-type events only. -
itemAmount
public int itemAmount -
unit
valid for unit-type events only, and even in that case may be null. -
payload
valid only for payload events -
plans
valid only for removePlanned events only; contains packed positions. -
unitIDs
valid only for command unit events -
buildingPositions
valid only for command building events
-
-
Constructor Details
-
PlayerAction
public PlayerAction()
-
-
Method Details
-
set
public Administration.PlayerAction set(mindustry.gen.Player player, Administration.ActionType type, Tile tile) -
set
public Administration.PlayerAction set(mindustry.gen.Player player, Administration.ActionType type, mindustry.gen.Unit unit) -
reset
public void reset()Description copied from interface:Pool.Poolable
Resets the object for reuse. Object references should be nulled and fields may be set to default values.- Specified by:
reset
in interfacePool.Poolable
-