[This is preliminary documentation and is subject to change.]

The Player type exposes the following events.

Events

 Public

 Protected
 Instance

 Static
 Declared

 Inherited
 XNA Framework Only

 .NET Compact Framework Only

 MemberDescription
BeingKicked
Occurs before a player is kicked (cancelable). Kick may be caused by /Kick, /Ban, /BanIP, or /BanAll commands, or by idling. Callbacks may override whether the kick will be announced or recorded in PlayerDB.
Clicked
Occurs after a player has clicked a block. Note that a click will not necessarily result in a block being placed or deleted.
Clicking
Occurs when player clicked a block (cancelable). Note that a click will not necessarily result in a block being placed or deleted.
Connected
Occurs when a player has connected, but before the player has joined any world. Allows changing the player's starting world. Player's state at this point is SessionState.Connecting, and about to change to SessionState.LoadingMain
Connecting
Occurs when a player is connecting (cancelable). Player name is verified and bans are checked before this event is raised, but before the player is registered with the server. Player's state at this point is SessionState.Connecting.
Disconnected
Occurs when a player disconnects.
HideChanged
Happens after a player has hidden or unhidden.
JoinedWorld
Occurs after a player has joined a world.
JoiningWorld
Occurs when a player intends to join a world (cancelable).
Kicked
Occurs after a player has been kicked. Specifically, it happens after kick has been announced and recorded to PlayerDB (if applicable), just before the target player disconnects. Kick may be caused by /Kick, /Ban, /BanIP, or /BanAll commands, or by idling.
Moved
Occurs when player has moved.
Moving
Occurs when player is about to move (cancelable).
PlacedBlock
Occurs when a player has placed a block. This event does not occur if the block placement was disallowed.
PlacingBlock
Occurs when a player is about to place a block. Permission checks are done before calling this event, and their result may be overridden.
Ready
Occurs after a player has connected and joined the starting world. Player's state at this point has just changed from SessionState.LoadingMain to SessionState.Online

See Also