net.acomputerdog.BlazeLoader.event
Interface PlayerEventHandler

All Superinterfaces:
BLMod, com.mumfrey.liteloader.modconfig.Exposable, com.mumfrey.liteloader.api.Listener, com.mumfrey.liteloader.LiteMod

public interface PlayerEventHandler
extends BLMod

Interface for mods that handle player events


Method Summary
 void eventClientJoinGame(net.minecraft.network.INetHandler netHandler, net.minecraft.network.play.server.S01PacketJoinGame loginPacket)
          Called when the client connects to a server or singleplayer game
 void eventClientPlayerDeath()
          Called when the client player dies.
 boolean eventMPPlayerLoginAttempt(java.lang.String username, boolean isAllowed)
          Called when a player attempts to log in.
 void eventMPPlayerLogout(net.minecraft.entity.player.EntityPlayerMP player)
          Called when a player logs out of the game.
 void eventMPPlayerRespawn(net.minecraft.entity.player.EntityPlayerMP oldPlayer, net.minecraft.entity.player.EntityPlayerMP newPlayer, int dimension, boolean causedByDeath)
          Called when a non-local player respawns.
 void eventPlayerLogin(net.minecraft.entity.player.EntityPlayerMP player)
          Called when a player logs into the game.
 
Methods inherited from interface net.acomputerdog.BlazeLoader.mod.BLMod
getModDescription, getModId, getName, getNewerVersion, getVersion, isCompatibleWithEnvironment
 
Methods inherited from interface com.mumfrey.liteloader.LiteMod
init, upgradeSettings
 

Method Detail

eventMPPlayerLoginAttempt

boolean eventMPPlayerLoginAttempt(java.lang.String username,
                                  boolean isAllowed)
Called when a player attempts to log in. This is after the game has already checked if the user is valid.

Parameters:
username - The username of the player attempting to join.
isAllowed - The result of the game's user check. True if the player is allowed to join.
Returns:
Return true to allow the player to join, false to prevent it.

eventPlayerLogin

void eventPlayerLogin(net.minecraft.entity.player.EntityPlayerMP player)
Called when a player logs into the game.

Parameters:
player - The player logging in.

eventMPPlayerLogout

void eventMPPlayerLogout(net.minecraft.entity.player.EntityPlayerMP player)
Called when a player logs out of the game.

Parameters:
player - The player logging out.

eventMPPlayerRespawn

void eventMPPlayerRespawn(net.minecraft.entity.player.EntityPlayerMP oldPlayer,
                          net.minecraft.entity.player.EntityPlayerMP newPlayer,
                          int dimension,
                          boolean causedByDeath)
Called when a non-local player respawns. Only works for other players.

Parameters:
oldPlayer - The player that died.
newPlayer - The player being spawned.
dimension - The dimension to spawn in.
causedByDeath - If the respawn was triggered by death, vs beating the game.

eventClientPlayerDeath

void eventClientPlayerDeath()
Called when the client player dies.


eventClientJoinGame

void eventClientJoinGame(net.minecraft.network.INetHandler netHandler,
                         net.minecraft.network.play.server.S01PacketJoinGame loginPacket)
Called when the client connects to a server or singleplayer game

Parameters:
netHandler - The network handler processing loginPacket
loginPacket - The login packet for this login