Java 类net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent 实例源码

项目:wizards-of-lua    文件:ServerProxy.java   
@SubscribeEvent
public void onEvent(PlayerLoggedOutEvent evt) {
  EntityPlayerMP testPlayer = WolTestEnvironment.instance.getTestPlayer();
  if (testPlayer != null && testPlayer == evt.player) {
    WolTestEnvironment.instance.setTestPlayer(null);
  }
}
项目:blockbuster    文件:ActionHandler.java   
/**
 * Event listener when player logs out. This listener aborts the recording
 * for given player (well, if he records, but that {@link RecordManager}'s
 * job to find out).
 */
@SubscribeEvent
public void onPlayerLogOut(PlayerLoggedOutEvent event)
{
    EntityPlayer player = event.player;

    if (!player.worldObj.isRemote)
    {
        CommonProxy.manager.abortRecording(player);
    }
}
项目:MC-Prefab    文件:ModEventHandler.java   
/**
 * This event is used to clear out the server configuration for clients that log off the server.
 * @param event The event object.
 */
@SubscribeEvent
public static void onPlayerLoggedOutEvent(PlayerLoggedOutEvent event)
{
    // When the player logs out, make sure to re-set the server configuration. 
    // This is so a new configuration can be successfully loaded when they switch servers or worlds (on single player.
    if (event.player.world.isRemote)
    {
        // Make sure to null out the server configuration from the client.
        ((ClientProxy)Prefab.proxy).serverConfiguration = null;
    }
}
项目:morecommands    文件:CommonHandler.java   
/**
 * Invoked when a player logs out. Used to update and save the player's settings
 */
@SubscribeEvent
public void playerLogout(PlayerLoggedOutEvent event) {
    if (!(event.player instanceof EntityPlayerMP)) return;
    ServerPlayerSettings settings = event.player.getCapability(PlayerSettings.SETTINGS_CAP_SERVER, null);

    if (settings!= null) {
        settings.captureChannelsAndLeaveForLogout();
        settings.resetSettingsProperties(Maps.<SettingsProperty, String>newEnumMap(SettingsProperty.class));
        settings.getManager().saveSettings();
    }
}
项目:Hard-Science    文件:CommonEventHandler.java   
@SubscribeEvent
public static void onPlayerLoggedOut(PlayerLoggedOutEvent event)
{
    if(event.player instanceof EntityPlayerMP)
    {
        ExcavationRenderTracker.INSTANCE.stopPlayerTracking((EntityPlayerMP) event.player);
    }
}
项目:WirelessRedstone    文件:WREventHandler.java   
@SubscribeEvent
public void playerLogout(PlayerLoggedOutEvent event) {
    RedstoneEther.server().removePlayer(event.player);
    RedstoneEtherAddons.server().onLogout(event.player);
}
项目:Mods    文件:TF2EventsCommon.java   
@SubscribeEvent
public void cleanPlayer(PlayerLoggedOutEvent event) {
    ItemUsable.lastDamage.remove(event.player);
    if(TF2weapons.udpServer != null)
        TF2weapons.udpServer.playerList.remove(event.player.getCapability(TF2weapons.PLAYER_CAP, null).udpServerId);
}
项目:BIGB    文件:ServerHandler.java   
@SubscribeEvent
public void logoutEvent(PlayerLoggedOutEvent event) {
    NEIServerConfig.unloadPlayer(event.player);
}
项目:Toms-Mod    文件:EventHandler.java   
@SubscribeEvent
public void onPlayerLoggedOut(PlayerLoggedOutEvent event) {
    if (!event.player.world.isRemote) {
        PlayerHandler.playerLogOut(event.player);
    }
}
项目:ChickenChunks    文件:ChunkLoaderEventHandler.java   
@SubscribeEvent
public void playerLogout(PlayerLoggedOutEvent event) {
    PlayerChunkViewerManager.instance().logouts.add(event.player.getName());
}
项目:TaleCraft    文件:TaleCraftEventHandler.java   
@SubscribeEvent
public void playerLoggedOut(PlayerLoggedOutEvent event) {
    if(event.player instanceof EntityPlayerMP) {
        ServerHandler.getServerMirror(null).playerList().playerLeave((EntityPlayerMP) event.player);
    }
}
项目:NotEnoughItems    文件:ServerHandler.java   
@SubscribeEvent
public void logoutEvent(PlayerLoggedOutEvent event) {
    NEIServerConfig.unloadPlayer(event.player);
}
项目:mcplus_mods    文件:EventHandlerBattleHearts.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent par1Event)
{
    setMaxHealth(par1Event.player, 20);
}