當前位置: 首頁>>代碼示例>>Java>>正文


Java PlayerEvent.PlayerLoggedOutEvent方法代碼示例

本文整理匯總了Java中cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java PlayerEvent.PlayerLoggedOutEvent方法的具體用法?Java PlayerEvent.PlayerLoggedOutEvent怎麽用?Java PlayerEvent.PlayerLoggedOutEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cpw.mods.fml.common.gameevent.PlayerEvent的用法示例。


在下文中一共展示了PlayerEvent.PlayerLoggedOutEvent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
  public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event)
  {
System.out.println("Logged out: " + event.player);

for (Dungeon d : Main.DUNGEONS)
{
	if (event.player.dimension == d.DIM_ID)
	{
		Main.getPlayerServer(event.player).travelToDimension(d.DIM_RETOUR, event.player.dimension);
		Main.log(event.player.getCommandSenderName() + " has disconnected into a dungeon");
		return ;
	}
}

  }
 
開發者ID:GhostMonk3408,項目名稱:MidgarCrusade,代碼行數:17,代碼來源:ServerEvent.java

示例2: playerLogoutEvent

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void playerLogoutEvent(PlayerEvent.PlayerLoggedOutEvent event) {
    if (event.player == null) {
        return;
    }

    for (InterfaceRegistry.InterfaceDataContainer dataContainer : InterfaceRegistry.getInterfacesOfPlayer(event.player.getUniqueID())) {
        // DEBUG
        //event.player.addChatComponentMessage(new ChatComponentText(String.format(">>>>>> x: %d, y: %d, z: %d", dataContainer.x, dataContainer.y, dataContainer.z)));
        //LogHelper.info(String.format(">>>>>> DIM: %d, x: %d, y: %d, z: %d", dataContainer.dimensionID, dataContainer.x, dataContainer.y, dataContainer.z));
        TileEntityPlayerInterface te = ((TileEntityPlayerInterface) DimensionManager.getWorld(dataContainer.dimensionID).getTileEntity(dataContainer.x, dataContainer.y, dataContainer.z));

        if (te != null) {
            te.setPlayerOffline();
        }
    }
}
 
開發者ID:Dragon9815,項目名稱:PlayerInterfaceMod,代碼行數:18,代碼來源:PlimEventHandler.java

示例3: onLeaveWorlds

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onLeaveWorlds(PlayerEvent.PlayerLoggedOutEvent e) {
    activePlayers.remove(new PlayerID(e.player));
     for (Acceptor<EntityPlayerMP> action: onLogout) {
         action.accept((EntityPlayerMP)e.player);
     }
}
 
開發者ID:SneakyTactician,項目名稱:BIGB,代碼行數:8,代碼來源:PlayerDetector.java

示例4: onClientDisconnect

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onClientDisconnect(PlayerEvent.PlayerLoggedOutEvent event) {
	if (FMLCommonHandler.instance().getSide() == Side.SERVER || FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
		for (ConfigRegistry.ConfigProxy proxy : ConfigRegistry.configs) {
			if (proxy.doesSync)
				NETWORK.sendTo(new ConfigPacket(proxy.fileName, proxy.handler.convertToString(proxy.config), true), (EntityPlayerMP) event.player);
		}
}
 
開發者ID:austinv11,項目名稱:CollectiveFramework,代碼行數:9,代碼來源:CollectiveFramework.java

示例5: onPlayerQuit

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onPlayerQuit(PlayerEvent.PlayerLoggedOutEvent event) {
    if (event.player.worldObj.isRemote) {
        return;
    }
    handleQuit((EntityPlayerMP) event.player);
}
 
開發者ID:boy0001,項目名稱:FastAsyncWorldedit,代碼行數:8,代碼來源:ForgeMain.java

示例6: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerLogout( PlayerEvent.PlayerLoggedOutEvent event )
{
    EntityPlayer player = event.player;
    if( FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER )
    {
        QCraft.clearUnverifiedLuggage( player );
    }
}
 
開發者ID:TeacherGaming,項目名稱:qcraft-mod,代碼行數:10,代碼來源:QCraftProxyCommon.java

示例7: on

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void on(PlayerEvent.PlayerLoggedOutEvent e) {
    EntityPlayer player = e.player;
    DataFamiliar familiarData = SyncDataHolder.getDataServer("FamiliarData");
    if(familiarData.hasFamiliar(player)) {
        familiarData.handleUnsafeUnequip(player);
    }

    TCMazeHandler.closeSession(e.player, true);
}
 
開發者ID:makeoo,項目名稱:Gadomancy,代碼行數:11,代碼來源:EventHandlerNetwork.java

示例8: playerEvent_Logout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent(priority = EventPriority.LOWEST)
public void playerEvent_Logout(PlayerEvent.PlayerLoggedOutEvent event)
{
    LogEvent log = new LogEvent();

    log.setType(TYPE_LOGOUT);
    log.setPlayerPosAndUuid(event.player);

    LoggingQueue.addToQueue(log);
}
 
開發者ID:DoubleDoorDevelopment,項目名稱:D3Log,代碼行數:11,代碼來源:FMLEventHandler.java

示例9: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent e) {
    //Reset certain corruption
    Corruption.blockTeleportCorruption.blocksBroken.setCount(e.player.getCommandSenderName(), 0);
    Corruption.waterAllergyCorruption.playerCount.setCount(e.player.getCommandSenderName(), 0);
    Corruption.gluttonyCorruption.playerCount.setCount(e.player.getCommandSenderName(), 0);
    Corruption.colourBlindCorruption.playerCount.setCount(e.player.getCommandSenderName(), 0);
    Corruption.stoneSkinCorruption.playerCount.setCount(e.player.getCommandSenderName(), 0);
}
 
開發者ID:kihira,項目名稱:Corruption,代碼行數:10,代碼來源:FMLEventHandler.java

示例10: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent ev) {
    Resident res = MyTownUniverse.instance.getOrMakeResident(ev.player);
    if (res != null) {
        res.setPlayer(ev.player);
    }
}
 
開發者ID:MyEssentials,項目名稱:MyTown2,代碼行數:8,代碼來源:Ticker.java

示例11: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent ev) {
    for(int i = 0; i < ev.player.inventory.getSizeInventory(); i++) {
        ItemStack stack = ev.player.inventory.getStackInSlot(i);
        if(stack == null || !stack.getDisplayName().startsWith(Tool.IDENTIFIER)) {
            continue;
        }

        PlayerUtils.takeItemFromPlayer(ev.player, stack, 1);
    }
}
 
開發者ID:MyEssentials,項目名稱:MyEssentials-Core,代碼行數:12,代碼來源:ToolManager.java

示例12: playerLoggedOut

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void playerLoggedOut(PlayerEvent.PlayerLoggedOutEvent playerLoggedOutEvent){
    ChatBoxEventSystem.eventLoggedOut(playerLoggedOutEvent.player);
}
 
開發者ID:Avaja,項目名稱:OpenTechnology,代碼行數:5,代碼來源:CommonEvents.java

示例13: onPlayerEventPlayerLoggedOutEvent

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerEventPlayerLoggedOutEvent(PlayerEvent.PlayerLoggedOutEvent event) {
  GabcFilePaths.mcSavesCurrent = null;
}
 
開發者ID:BeyondMinecraft,項目名稱:AbacusCommonsLib,代碼行數:5,代碼來源:GabcSubscribeEvents.java

示例14: onPlayerLoggedOut

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) {
}
 
開發者ID:CosmicDan-Minecraft,項目名稱:Imperium,代碼行數:4,代碼來源:PlayerEvents.java

示例15: onPlayerLogout

import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event) {
}
 
開發者ID:NovaViper,項目名稱:ZeroQuest,代碼行數:3,代碼來源:OnPlayerLogin.java


注:本文中的cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。