本文整理汇总了Java中net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent类的典型用法代码示例。如果您正苦于以下问题:Java PlayerRespawnEvent类的具体用法?Java PlayerRespawnEvent怎么用?Java PlayerRespawnEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayerRespawnEvent类属于net.minecraftforge.fml.common.gameevent.PlayerEvent包,在下文中一共展示了PlayerRespawnEvent类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onPlayerRespawn(PlayerRespawnEvent event)
{
if(stackMap.containsKey(event.player.getUniqueID()))
{
event.player.getEntityData().setTag("harshenInventory", stackMap.get(event.player.getUniqueID()).serializeNBT());
for(int i = 0; i < stackMap.get(event.player.getUniqueID()).getSlots(); i++)
if(stackMap.get(event.player.getUniqueID()).getStackInSlot(i).getItem() instanceof IHarshenProvider)
((IHarshenProvider)stackMap.get(event.player.getUniqueID()).getStackInSlot(i).getItem()).onAdd(event.player, i);
}
}
开发者ID:kenijey,项目名称:harshencastle,代码行数:13,代码来源:HandlerHarshenInventory.java
示例2: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event) {
EntityPlayer player = event.player;
if (!player.worldObj.isRemote) {
if (PossessHandler.isPossessing(player)) {
PossessHandler.possess(player, null);
}
}
}
开发者ID:Fararise,项目名称:Possessed,代码行数:10,代码来源:ServerEventHandler.java
示例3: onPlayerRespawnEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawnEvent(PlayerRespawnEvent evt) {
if (FMLCommonHandler.instance().getEffectiveSide() != Side.SERVER) {
return;
}
EntityPlayerMP player = (EntityPlayerMP) evt.player;
addWolPacketHandler(player);
replacePlayerInstance(player);
}
开发者ID:wizards-of-lua,项目名称:wizards-of-lua,代码行数:10,代码来源:WolEventHandler.java
示例4: onEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onEvent(PlayerRespawnEvent evt) {
EntityPlayerMP player = (EntityPlayerMP) evt.player;
WolTestEnvironment.instance.setTestPlayer(player);
makeOperator(player);
ConfigMessage message = new ConfigMessage(WolTestEnvironment.VERSION);
WolTestEnvironment.instance.getPacketDispatcher().sendTo(message, player);
}
开发者ID:wizards-of-lua,项目名称:wizards-of-lua,代码行数:9,代码来源:ServerProxy.java
示例5: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
PlayerAether playerAether = PlayerAether.get(event.player);
if (playerAether != null)
{
playerAether.onPlayerRespawn();
}
}
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:11,代码来源:PlayerAetherEvents.java
示例6: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onPlayerRespawn(PlayerRespawnEvent event)
{
if(event.player instanceof EntityPlayerMP)
{
ExcavationRenderTracker.INSTANCE.updatePlayerTracking((EntityPlayerMP) event.player);
}
}
开发者ID:grondag,项目名称:Hard-Science,代码行数:9,代码来源:CommonEventHandler.java
示例7: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@HarshenEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
event.player.inventory.readFromNBT(INVENTORY_MAP.get(event.player.getUniqueID()));
HarshenNetwork.sendToPlayer(event.player, new MessagePacketReviveInventory(event.player));
}
开发者ID:kenijey,项目名称:harshencastle,代码行数:7,代码来源:SoulBindingPendant.java
示例8: playerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void playerRespawn(PlayerRespawnEvent event) {
RedstoneEther.server().resetPlayer(event.player);
RedstoneEtherAddons.server().onLogin(event.player);
}
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:6,代码来源:WREventHandler.java
示例9: OnPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void OnPlayerRespawn (PlayerRespawnEvent e)
{
e.player.world.spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, e.player.posX, e.player.posY, e.player.posZ, 1.0D, 0.0D, 0.0D, new int[0]);
e.player.world.playSound((EntityPlayer)null, e.player.posX, e.player.posY, e.player.posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.PLAYERS, 4.0F, (1.0F + (e.player.world.rand.nextFloat() - e.player.world.rand.nextFloat()) * 0.2F) * 0.7F);
}
开发者ID:williambl,项目名称:EssentialFeatures,代码行数:7,代码来源:CommonEventHandler.java
示例10: loginEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void loginEvent(PlayerRespawnEvent event) {
NEIServerConfig.forPlayer(event.player.getCommandSenderName()).onWorldReload();
}
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:5,代码来源:ServerHandler.java
示例11: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event) {
SkinCore.updatePlayerSkinTracking(event.player);
}
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:5,代码来源:SkinCapability.java
示例12: loginEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void loginEvent(PlayerRespawnEvent event) {
NEIServerConfig.getSaveForPlayer(event.player.getName()).onWorldReload();
}
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:5,代码来源:ServerHandler.java
示例13: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
}
开发者ID:Deadrik,项目名称:TFC2,代码行数:6,代码来源:PlayerTracker.java
示例14: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{ sendBackpackStack(event.player, event.player); }
开发者ID:copygirl,项目名称:WearableBackpacks,代码行数:4,代码来源:ProxyCommon.java
注:本文中的net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论