当前位置: 首页>>代码示例>>Java>>正文


Java PlayerLoggedOutEvent类代码示例

本文整理汇总了Java中cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent的典型用法代码示例。如果您正苦于以下问题:Java PlayerLoggedOutEvent类的具体用法?Java PlayerLoggedOutEvent怎么用?Java PlayerLoggedOutEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlayerLoggedOutEvent类属于cpw.mods.fml.common.gameevent.PlayerEvent包,在下文中一共展示了PlayerLoggedOutEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@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);
	}
}
 
开发者ID:CreativeMD,项目名称:HandCraft,代码行数:17,代码来源:ServerTick.java

示例2: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{
    if (event.player instanceof EntityPlayerMP)
    {
        this.onPlayerLogout((EntityPlayerMP) event.player);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:AsteroidsPlayerHandler.java

示例3: onPlayerLoggedOut

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:LambdaInnovation,项目名称:LambdaLib,代码行数:15,代码来源:LIFMLGameEventDispatcher.java

示例4: onPlayerLogoutEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event)
{
	Mekanism.jetpackOn.remove(event.player.getCommandSenderName());
	Mekanism.gasmaskOn.remove(event.player.getCommandSenderName());
	Mekanism.flamethrowerActive.remove(event.player.getCommandSenderName());
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:8,代码来源:CommonPlayerTracker.java

示例5: onPlayerLoggedOutEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@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);
		}
	}
}
 
开发者ID:EchebKeso,项目名称:Mocap,代码行数:15,代码来源:MocapEventHandler.java

示例6: logout

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@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);
       }
   }
 
开发者ID:Ubiquitous-Spice,项目名称:ModJam-4,代码行数:15,代码来源:StainManager.java

示例7: onPlayerLoggedOut

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@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);
	}
		
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:9,代码来源:ForgeEventHandler.java

示例8: onPlayerLeave

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLeave(PlayerLoggedOutEvent event) {
    synchronized (playerListeners) {
        for (IPlayerEventHook listener : playerListeners) {
            listener.onPlayerLeave(event.player.getDisplayName());
        }
    }
}
 
开发者ID:theoriginalbit,项目名称:MoarPeripherals,代码行数:9,代码来源:ChatBoxHandler.java

示例9: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10-pre-1.3a,代码行数:12,代码来源:ExperienceRedistributor.java

示例10: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event)
{
    ChunkLoadingCallback.onPlayerLogout(event.player);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:6,代码来源:ConnectionEvents.java

示例11: logoutEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void logoutEvent(PlayerLoggedOutEvent event) {
    NEIServerConfig.unloadPlayer(event.player);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:5,代码来源:ServerHandler.java

示例12: onPlayerLeave

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
public void onPlayerLeave(PlayerLoggedOutEvent event) {
	
	FWPlayerStats stats = FWPlayerStats.get(event.player);
	stats.isLoggedIn = false;
}
 
开发者ID:TeamMonumental,项目名称:FusionWarfare,代码行数:6,代码来源:OnPlayerJoinEvent.java

示例13: onPlayerLogoutEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event) {
	prevAtmosphere.remove(event.player);
}
 
开发者ID:zmaster587,项目名称:AdvancedRocketry,代码行数:5,代码来源:AtmosphereHandler.java

示例14: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent e) {
}
 
开发者ID:ArtixAllMighty,项目名称:rpginventory,代码行数:4,代码来源:PlayerTracker.java

示例15: onPlayerLoggedOut

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLoggedOut(PlayerLoggedOutEvent evt) {
    removeFromAll(evt.player);
}
 
开发者ID:Tonius,项目名称:SimplyJetpacks,代码行数:5,代码来源:SyncHandler.java


注:本文中的cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。