当前位置: 首页>>代码示例>>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;未经允许,请勿转载。