本文整理匯總了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 ;
}
}
}
示例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();
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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 );
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例12: playerLoggedOut
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void playerLoggedOut(PlayerEvent.PlayerLoggedOutEvent playerLoggedOutEvent){
ChatBoxEventSystem.eventLoggedOut(playerLoggedOutEvent.player);
}
示例13: onPlayerEventPlayerLoggedOutEvent
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerEventPlayerLoggedOutEvent(PlayerEvent.PlayerLoggedOutEvent event) {
GabcFilePaths.mcSavesCurrent = null;
}
示例14: onPlayerLoggedOut
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) {
}
示例15: onPlayerLogout
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event) {
}