Package net.minecraft.entity.player

Examples of net.minecraft.entity.player.EntityPlayer.addChatMessage()


        }
        player.setHealth(1);
        player.attackEntityFrom(ModularForceFieldSystem.damagefieldShock, 100);
        interdictionMatrix.requestFortron(Settings.INTERDICTION_MURDER_ENERGY, false);

        player.addChatMessage("[" + interdictionMatrix.getInvName() + "] " + LanguageUtility.getLocal("message.moduleAntiPersonnel.death"));
      }
    }

    return false;
  }
View Full Code Here


            isGranted = true;
          }

          if (!isGranted && this.worldObj.rand.nextInt(3) == 0 && getModuleCount(ModularForceFieldSystem.itemModuleSilence) <= 0)
          {
            player.addChatMessage("[" + this.getInvName() + "] " + LanguageUtility.getLocal("message.interdictionMatrix.warn"));
          }

        }
      }
View Full Code Here

      if(amulet != null && amulet.getItem() == this) {
        event.setCanceled(true);
        player.setHealth(player.getMaxHealth());
        player.addPotionEffect(new PotionEffect(Potion.resistance.id, 300, 6));
        player.addChatMessage(new ChatComponentTranslation("botaniamisc.savedByLaurel"));
        player.worldObj.playSoundAtEntity(player, "botania:goldenLaurel", 1F, 0.3F);
        PlayerHandler.getPlayerBaubles(player).setInventorySlotContents(0, null);
      }
    }
  }
View Full Code Here

        if(Morph.config.getSessionInt("canSleepMorphed") == 0)
        {
            if(FMLCommonHandler.instance().getEffectiveSide().isServer() && Morph.proxy.tickHandlerServer.getPlayerMorphInfo(player) != null)
            {
                event.result = stats;
                player.addChatMessage(new ChatComponentTranslation("morph.denySleep"));
            }
            else if(FMLCommonHandler.instance().getEffectiveSide().isClient() && Morph.proxy.tickHandlerClient.playerMorphInfo.containsKey(player.getCommandSenderName()))
            {
                event.result = stats;
            }
View Full Code Here

  @SubscribeEvent
  public void onPlayerLogin(PlayerLoggedInEvent event) {

    EntityPlayer player = event.player;
    if (ServerHelper.isMultiPlayerServer() && CoFHProps.enableOpSecureAccess && CoFHProps.enableOpSecureAccessWarning) {
      player.addChatMessage(new ChatComponentText(StringHelper.YELLOW + "[CoFH] " + StringHelper.WHITE + StringHelper.localize("chat.cofh.secure.0")
          + StringHelper.END));
    }
    PacketCore.sendConfigSyncPacketToClient(event.player);
    handleIdMappingEvent(null);
  }
View Full Code Here

          return;
        }
        ModVersion newVersion = _updateThread.newVersion();

        EntityPlayer player = evt.player;
        player.addChatMessage(new ChatComponentText(GOLD + "[" + _mod.getModName() + "]").appendText(WHITE + " A new version is available:"));
        IChatComponent chat;
        String text = newVersion.modVersion().toString();
        if (Strings.isNullOrEmpty(_downloadUrl)) {
          chat = new ChatComponentText(text).setChatStyle(version);
        } else {
View Full Code Here

          chat = IChatComponent.Serializer.func_150699_a("[{\"text\":\"" + text + "\",\"color\":\"aqua\"}," + "{\"text\":\" " + WHITE + "[" + GREEN
              + "Download" + WHITE + "]\"," + "\"color\":\"green\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":"
              + "{\"text\":\"Click this to download the latest version\",\"color\":\"yellow\"}},"
              + "\"clickEvent\":{\"action\":\"open_url\",\"value\":\"" + _downloadUrl + "\"}}]");
        }
        player.addChatMessage(chat);
        player.addChatMessage(new ChatComponentText(newVersion.description()).setChatStyle(description));
      }
    }
  }
View Full Code Here

              + "Download" + WHITE + "]\"," + "\"color\":\"green\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":"
              + "{\"text\":\"Click this to download the latest version\",\"color\":\"yellow\"}},"
              + "\"clickEvent\":{\"action\":\"open_url\",\"value\":\"" + _downloadUrl + "\"}}]");
        }
        player.addChatMessage(chat);
        player.addChatMessage(new ChatComponentText(newVersion.description()).setChatStyle(description));
      }
    }
  }

}
View Full Code Here

        // left Click
        if (event.action.equals(PlayerInteractEvent.Action.LEFT_CLICK_BLOCK))
        {
            PlayerInfo.selectionProvider.setPoint1((EntityPlayerMP) event.entityPlayer, point);
            IChatComponent format = OutputHandler.createFromText("Pos1 set to " + event.x + ", " + event.y + ", " + event.z);
            player.addChatMessage(OutputHandler.colourize(format, EnumChatFormatting.DARK_PURPLE));
            event.setCanceled(true);
        }
        // right Click
        else if (event.action.equals(PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK))
        {
View Full Code Here

        // right Click
        else if (event.action.equals(PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK))
        {
            PlayerInfo.selectionProvider.setPoint2((EntityPlayerMP) event.entityPlayer, point);
            IChatComponent format = OutputHandler.createFromText("Pos2 set to " + event.x + ", " + event.y + ", " + event.z);
            player.addChatMessage(OutputHandler.colourize(format, EnumChatFormatting.DARK_PURPLE));
            event.setCanceled(true);
        }
    }
   
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.