当前位置: 首页>>代码示例>>Java>>正文


Java PlayerRespawnEvent类代码示例

本文整理汇总了Java中cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent的典型用法代码示例。如果您正苦于以下问题:Java PlayerRespawnEvent类的具体用法?Java PlayerRespawnEvent怎么用?Java PlayerRespawnEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlayerRespawnEvent类属于cpw.mods.fml.common.gameevent.PlayerEvent包,在下文中一共展示了PlayerRespawnEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
    if (event.player instanceof EntityPlayerMP)
    {
        this.onPlayerRespawn((EntityPlayerMP) event.player);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:AsteroidsPlayerHandler.java

示例2: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
	if (!roundstarted) return;
	event.player.setLocationAndAngles(cSpawnx, 200, cSpawnz,0,0);
	PacketDispatcher.packetsys.sendTo(new GuiSpawnPacket(), (EntityPlayerMP) event.player);
}
 
开发者ID:rodolphito,项目名称:Rival-Rebels-Mod,代码行数:8,代码来源:RivalRebelsRound.java

示例3: onRespawnEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onRespawnEvent(PlayerRespawnEvent event) 
{
	if (event.isCancelable())
		return;
	
	if(!event.player.capabilities.allowEdit)
	{
		event.player.setGameType(GameType.SURVIVAL);
	}
}
 
开发者ID:gigabit101,项目名称:BuildcentricTweeks,代码行数:12,代码来源:RespawnEvent.java

示例4: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event) {
    if (!addPlayerRespawn.isEmpty()) {
        hPlayerRespawn.addAll(addPlayerRespawn);
        addPlayerRespawn.clear();
    }
    for (Iterator<LIHandler> it = hPlayerRespawn.iterator(); it.hasNext(); ) {
        LIHandler handler = it.next();
        if (handler.isDead())
            it.remove();
        else
            handler.trigger(event);
    }
}
 
开发者ID:LambdaInnovation,项目名称:LambdaLib,代码行数:15,代码来源:LIFMLGameEventDispatcher.java

示例5: onRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRespawn(PlayerRespawnEvent event){
	if(event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).hasKey("MineGate_Recovery"))
	{
		ItemStack item = new ItemStack(recovery);
		item.setTagCompound(event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getCompoundTag("MineGate_Recovery"));
		event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).removeTag("MineGate_Recovery");
		event.player.inventory.addItemStackToInventory(item);
	}
}
 
开发者ID:UnderMybrella,项目名称:Minegate,代码行数:11,代码来源:MineGate.java

示例6: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent e) {
	if (!e.player.worldObj.isRemote) {
		PacketHelper.syncOwnInventory((EntityPlayerMP) e.player,PlayerRpgInventory.get(e.player));
	}
	PlayerRpgInventory.get(e.player);
}
 
开发者ID:ArtixAllMighty,项目名称:rpginventory,代码行数:8,代码来源:PlayerTracker.java

示例7: onPlayerRespawnEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawnEvent(PlayerRespawnEvent event) {

    KnowledgeHandler playerKnowledge = new KnowledgeHandler(event.player.getDisplayName());
    playerKnowledge.setKnowledgeXP(0);
    // TODO: Convert to lang
    event.player.addChatComponentMessage(new ChatComponentText("You've lost some brain cells caused by the damage. Brain XP: "
            + (int) playerKnowledge.getKnowledgeXP()));
}
 
开发者ID:TheFjonG,项目名称:Factorial-Automation,代码行数:10,代码来源:ModEventHandler.java

示例8: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event) {
    Integer experience = entityIdToExperience.remove(event.player.getEntityId());
    if (experience != null) {
        ProjectZuluLog.info("Removing Experience [%s] and adding [%s]", event.player.experienceTotal, experience);
        event.player.experienceLevel = 0;
        event.player.experienceTotal = 0;
        event.player.experience = 0;
        event.player.addExperience(experience);
    }
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10-pre-1.3a,代码行数:12,代码来源:ExperienceRedistributor.java

示例9: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent 
public void onPlayerRespawn(PlayerRespawnEvent e) 
{ 
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:5,代码来源:ModPlayerTracker.java

示例10: loginEvent

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void loginEvent(PlayerRespawnEvent event) {
    NEISPH.sendHasServerSideTo((EntityPlayerMP) event.player);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:5,代码来源:ServerHandler.java

示例11: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
}
 
开发者ID:Aleksey-Terzi,项目名称:DecorationsTFC,代码行数:5,代码来源:PlayerTracker.java

示例12: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event) {
	if (event.player instanceof EntityPlayerMP)
		getProperties(event.player).respawn(event.player);
}
 
开发者ID:copygirl,项目名称:AdvHealthOptions,代码行数:6,代码来源:CommonProxy.java

示例13: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn (PlayerRespawnEvent event)
{
	onPlayerRespawn(event.player);
}
 
开发者ID:mookie1097,项目名称:NausicaaMod,代码行数:6,代码来源:NPlayerHandler.java

示例14: onRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRespawn(PlayerRespawnEvent e){
	Debug.mark();
	BlockSpawner.relocatePlayer(e.player);
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:6,代码来源:FMLEventHandler.java

示例15: onPlayerRespawn

import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
    PlayerInformation.forPlayer(event.player).setDirty();
}
 
开发者ID:Cortex-Modders,项目名称:CodeLyokoMod,代码行数:6,代码来源:EventHandler.java


注:本文中的cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。