本文整理汇总了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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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()));
}
示例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);
}
}
示例9: onPlayerRespawn
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent e)
{
}
示例10: loginEvent
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void loginEvent(PlayerRespawnEvent event) {
NEISPH.sendHasServerSideTo((EntityPlayerMP) event.player);
}
示例11: onPlayerRespawn
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
}
示例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);
}
示例13: onPlayerRespawn
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn (PlayerRespawnEvent event)
{
onPlayerRespawn(event.player);
}
示例14: onRespawn
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRespawn(PlayerRespawnEvent e){
Debug.mark();
BlockSpawner.relocatePlayer(e.player);
}
示例15: onPlayerRespawn
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerRespawnEvent event)
{
PlayerInformation.forPlayer(event.player).setDirty();
}