Java 类cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent 实例源码

项目:HandCraft    文件:ServerTick.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{
    ArrayList<RecipeChain> playerChains = chains.getValues(event.player);
    if(playerChains != null)
    {
        for (int i = 0; i < playerChains.size(); i++) {
            for (int j = 0; j < playerChains.get(i).result.stacks.size(); j++) {
                if(!InventoryUtils.addItemStackToInventory(event.player.inventory, playerChains.get(i).result.stacks.get(j)))
                    WorldUtils.dropItem(event.player, playerChains.get(i).result.stacks.get(j));
            }
        }

        chains.removeKey(event.player);
    }
}
项目:4Space-5    文件:AsteroidsPlayerHandler.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{
    if (event.player instanceof EntityPlayerMP)
    {
        this.onPlayerLogout((EntityPlayerMP) event.player);
    }
}
项目:4Space-5    文件:GCPlayerHandler.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{
    if (event.player instanceof EntityPlayerMP)
    {
        this.onPlayerLogout((EntityPlayerMP) event.player);
    }
}
项目:LambdaLib    文件:LIFMLGameEventDispatcher.java   
@SubscribeEvent
public void onPlayerLoggedOut(PlayerLoggedOutEvent event) {
    if (!addPlayerLoggedOut.isEmpty()) {
        hPlayerLoggedOut.addAll(addPlayerLoggedOut);
        addPlayerLoggedOut.clear();
    }
    for (Iterator<LIHandler> it = hPlayerLoggedOut.iterator(); it.hasNext(); ) {
        LIHandler handler = it.next();
        if (handler.isDead())
            it.remove();
        else
            handler.trigger(event);
    }
}
项目:vsminecraft    文件:CommonPlayerTracker.java   
@SubscribeEvent
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event)
{
    Mekanism.jetpackOn.remove(event.player.getCommandSenderName());
    Mekanism.gasmaskOn.remove(event.player.getCommandSenderName());
    Mekanism.flamethrowerActive.remove(event.player.getCommandSenderName());
}
项目:Mocap    文件:MocapEventHandler.java   
@SubscribeEvent
public void onPlayerLoggedOutEvent(PlayerLoggedOutEvent event) {
    Side side = FMLCommonHandler.instance().getEffectiveSide();

    if (side == Side.SERVER) {
        List<MocapAction> aList = Mocap.instance
                .getActionListForPlayer(event.player);

        if (aList != null) {
            MocapAction ma = new MocapAction(MocapActionTypes.LOGOUT);
            aList.add(ma);
        }
    }
}
项目:ModJam-4    文件:StainManager.java   
@SubscribeEvent
public void logout(PlayerLoggedOutEvent e)
{
    if (e.player.worldObj.isRemote)
    {
           // client
           INSTANCE.stains.clear();
       }
       else
       {
           // server
           PacketManager.sendToPlayer(new PacketStainRemover(e.player.dimension), e.player);
       }
   }
项目:SecurityCraft    文件:ForgeEventHandler.java   
@SubscribeEvent //TODO I used the Unload event before.
public void onPlayerLoggedOut(PlayerLoggedOutEvent event){
    if(mod_SecurityCraft.configHandler.disconnectOnWorldClose && mod_SecurityCraft.instance.getIrcBot() != null){
        mod_SecurityCraft.instance.getIrcBot().disconnect();
        mod_SecurityCraft.instance.setIrcBot(null);
    }

}
项目:MoarPeripherals    文件:ChatBoxHandler.java   
@SubscribeEvent
public void onPlayerLeave(PlayerLoggedOutEvent event) {
    synchronized (playerListeners) {
        for (IPlayerEventHook listener : playerListeners) {
            listener.onPlayerLeave(event.player.getDisplayName());
        }
    }
}
项目:projectzulu1.7.10-pre-1.3a    文件:ExperienceRedistributor.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event) {
    Integer experience = entityIdToExperience.remove(event.player.getEntityId());
    if (experience != null) {
        ProjectZuluLog.info("Removing Experience (%s) and adding (%s)", event.player.experienceTotal, experience);
        event.player.experienceLevel = 0;
        event.player.experienceTotal = 0;
        event.player.experience = 0;
        event.player.addExperience(experience);
    }
}
项目:projectzulu1.7.10    文件:ExperienceRedistributor.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event) {
    Integer experience = entityIdToExperience.remove(event.player.getEntityId());
    if (experience != null) {
        ProjectZuluLog.info("Removing Experience (%s) and adding (%s)", event.player.experienceTotal, experience);
        event.player.experienceLevel = 0;
        event.player.experienceTotal = 0;
        event.player.experience = 0;
        event.player.addExperience(experience);
    }
}
项目:4Space-5    文件:ConnectionEvents.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{
    ChunkLoadingCallback.onPlayerLogout(event.player);
}
项目:4Space-5    文件:ServerHandler.java   
@SubscribeEvent
public void logoutEvent(PlayerLoggedOutEvent event) {
    NEIServerConfig.unloadPlayer(event.player);
}
项目:FusionWarfare    文件:OnPlayerJoinEvent.java   
public void onPlayerLeave(PlayerLoggedOutEvent event) {

    FWPlayerStats stats = FWPlayerStats.get(event.player);
    stats.isLoggedIn = false;
}
项目:AdvancedRocketry    文件:AtmosphereHandler.java   
@SubscribeEvent
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event) {
    prevAtmosphere.remove(event.player);
}
项目:rpginventory    文件:PlayerTracker.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent e) {
}
项目:SimplyJetpacks    文件:SyncHandler.java   
@SubscribeEvent
public void onPlayerLoggedOut(PlayerLoggedOutEvent evt) {
    removeFromAll(evt.player);
}
项目:ShadowsOfPhysis    文件:ServerData.java   
@SubscribeEvent
public void onPlayerChangedDimension(PlayerLoggedOutEvent event) {
    instance(false).sendDataToPlayer(event.player);
}
项目:IceAndShadow2    文件:NyxDeathSystem.java   
@SubscribeEvent
public void onLogout(PlayerLoggedOutEvent e) {
    NyxDeathSystem.death_inv.remove(e.player.getEntityId());
}
项目:CodeLyokoMod    文件:EventHandler.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{

}
项目:MosesMod    文件:PlayerWatcher.java   
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event) {
    // This is for multiplayer
    Log.info("Player %s logged out. Restoring their passages...", event.player.getGameProfile().getName());
    MosesMod.mosesBlockProvider.restoreAllOwnedBlocksAndPlaySound(event.player.getEntityId());
}
项目:AMCore    文件:ClientPlayerTracker.java   
@SubscribeEvent
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event) {

}
项目:AMCore    文件:CommonPlayerTracker.java   
@SubscribeEvent
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event) {

}