EntityJoinWorldEvent
This fires each time an entity joins your world.
Cancellable = false
Parameter
EntityJoinWorldEvent
Methods
Entity
Returns the Entity.
World
Returns the World.
Example
/*
This lists all players that join in chat.
*/
@EventTarget
public void onEntityJoinWorld(EntityJoinWorldEvent event) {
if (event.getEntity() instanceof EntityPlayer) {
final EntityPlayer player = (EntityPlayer) event.getEntity();
if (player == null) return;
Meowtils.addMessage("Player joined: " + player.getName());
}
}