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


Java PlayerEvent.PlayerRespawnEvent方法代碼示例

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


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

示例1: PlayerRespawnEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void PlayerRespawnEvent(PlayerEvent.PlayerRespawnEvent event) {
	recalcTeams();

	int totalKills = event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getInteger("warsmod_totalKill");
	int killStreak = event.player.getEntityData().getInteger("warsmod_killstreak");
	int deaths = event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getInteger("warsmod_deaths");

	PacketDispatcher.sendTo(new PacketKills(totalKills, killStreak, deaths), (EntityPlayerMP) event.player);

	PacketDispatcher.sendTo(new PacketTeams(redPlayers, greenPlayers, bluePlayers, yellowPlayers), (EntityPlayerMP) event.player);

	WarsSavedData savedWarsData = WarsSavedData.get(event.player.worldObj);
	if (!savedWarsData.editMode.editModeToggle) {
		PacketDispatcher.sendTo(new PacketOpenTeamSelect(), (EntityPlayerMP) event.player);
	}

}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:Wars-Mod,代碼行數:19,代碼來源:CommonEvents.java

示例2: onPlayerRespawn

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
	event.player.getEntityData().removeTag(IGNORE_REVIVAL_DEATH);
	if (ModConfig.glowOnDeath) {
		event.player.setGlowing(false);
	}
}
 
開發者ID:blay09,項目名稱:HardcoreRevival,代碼行數:8,代碼來源:DeathHandler.java

示例3: onPlayerRespawn

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SuppressWarnings("unused")
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
    if (event.player == null) {
        return;
    }
    if(checkGear(event.player)) {
        equipGear(event.player);
    } else {
        unEquipGear(event.player);
    }
}
 
開發者ID:InfinityRaider,項目名稱:3DManeuverGear,代碼行數:13,代碼來源:DartHandler.java

示例4: onRespawned

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onRespawned(PlayerEvent.PlayerRespawnEvent event) {
    EntityPlayer player = event.player;
    updatePlayerSpechial(player);
    updatePlayerSkills(player);
    updatePlayerLevel(player);
    updatePlayerWater(player);
    updatePlayerRads(player);
    PlayerParamsSetup.normalizer(player);
}
 
開發者ID:Hoijima,項目名稱:Fallout_Equestria,代碼行數:11,代碼來源:UpdateEvents.java

示例5: playerRespawnEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent(priority = EventPriority.LOWEST)
public static void playerRespawnEvent(PlayerEvent.PlayerRespawnEvent event)
{
    if (FMLCommonHandler.instance().getEffectiveSide().isClient()) return;
    InventoryPlayer oldInventory = map.get(event.player.getPersistentID());
    if (oldInventory == null) return;
    event.player.inventory.copyInventory(oldInventory);
    map.remove(event.player.getPersistentID());
}
 
開發者ID:DoubleDoorDevelopment,項目名稱:D3Core,代碼行數:10,代碼來源:VoidRefunds.java

示例6: onRespawnSomewhere

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onRespawnSomewhere(PlayerEvent.PlayerRespawnEvent ev) {
    this.sendRequest(ev.player);
}
 
開發者ID:Randores,項目名稱:Randores2,代碼行數:5,代碼來源:RandoresPlayerListener.java

示例7: onRespawn

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public static void onRespawn(PlayerEvent.PlayerRespawnEvent e)
{
    e.player.getCapability(CapabilityRegistry.ENTRY_STORE_CAP, null).sync((EntityPlayerMP) e.player);
    e.player.getCapability(CapabilityRegistry.AURA_CONTAINER_CAP, null).sync((EntityPlayerMP) e.player);
}
 
開發者ID:PearXTeam,項目名稱:PurificatiMagicae,代碼行數:7,代碼來源:CapabilityEvents.java

示例8: toLua

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@Override
public Proxy<PlayerEvent.PlayerRespawnEvent> toLua(PlayerEvent.PlayerRespawnEvent javaObj) {
  return new Proxy<>(getConverters(), getMetatable(), javaObj);
}
 
開發者ID:wizards-of-lua,項目名稱:wizards-of-lua,代碼行數:5,代碼來源:PlayerRespawnEventClass.java

示例9: fixReachDistance

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void fixReachDistance(PlayerEvent.PlayerRespawnEvent event) {
    fixReachDistance((EntityPlayerMP)event.player);
}
 
開發者ID:purpleposeidon,項目名稱:Factorization,代碼行數:5,代碼來源:MiscellaneousNonsense.java

示例10: onPlayerRespawn

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event)
{
    JustEnoughDimensions.logInfo("PlayerEvent.PlayerRespawnEvent - DIM: {}", event.player.getEntityWorld().provider.getDimension());
    this.syncAndSetPlayerData(event.player);
}
 
開發者ID:maruohon,項目名稱:justenoughdimensions,代碼行數:7,代碼來源:JEDEventHandler.java

示例11: playerLoggedInEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void playerLoggedInEvent(PlayerEvent.PlayerRespawnEvent event) {
    if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
        MobHandler.setMobSpawnTime(event.player);
    }
}
 
開發者ID:NightKosh,項目名稱:Gravestone-mod-Graves,代碼行數:7,代碼來源:EventHandlerNetwork.java


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