Public Member Functions | |
void | execute (World world) |
A command that will be sent across the network to other users. The execute method will be called exactly once when it reaches the other player, so any processing (such as the creation of new Entities) should be performed in this method. NetworkCommand</clone>s must be immutable.
Definition at line 15 of file NetworkCommand.java.
void bubolo.net.NetworkCommand.execute | ( | World | world | ) |
Called when this NetworkCommand reaches another player. Perform any processing, such as the creation of new Entities, into this method. Note that references on one machine will not be valid on another, so instead of using references directly, you should get a reference to an entity by using its UUID:
Entity entity = World.getEntity(id)
Because of this, most execute
implementations will require at least the UUID of an object.
world | reference to the world object. You can safely use this directly. |