Examples of IChatComponent


Examples of net.minecraft.util.IChatComponent

                    }
                }

                counter -= ConfigurationBackpack.MAX_BACKPACK_AMOUNT;
                if(counter > 0) {
                    IChatComponent message = new ChatComponentText("[Backpacks] ");
                    message.appendSibling(new ChatComponentTranslation(Localizations.MESSAGE_ALLOWED_BACKPACKS, ConfigurationBackpack.MAX_BACKPACK_AMOUNT));
                    player.addChatMessage(message);
                    message = new ChatComponentText("[Backpacks] ").appendSibling(new ChatComponentTranslation(Localizations.MESSAGE_DROPPED_BACKPACKS, counter));
                    player.addChatMessage(message);
                }
            }
View Full Code Here

Examples of net.minecraft.util.IChatComponent

        int clientBuild = LibMisc.BUILD.contains("GRADLE") ? Integer.MAX_VALUE : Integer.parseInt(LibMisc.BUILD);
        if(onlineBuild > clientBuild) {
          player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.flavour" + player.worldObj.rand.nextInt(FLAVOUR_MESSAGES)).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
          player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.outdated", clientBuild, onlineBuild));

          IChatComponent component = IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("botania.versioning.updateMessage").replaceAll("%version%", onlineVersion));
          player.addChatComponentMessage(component);
        }
      }

      triedToWarnPlayer = true;
View Full Code Here

Examples of net.minecraft.util.IChatComponent

  }

  @Override
  public void run() {
    try {
      IChatComponent component = IChatComponent.Serializer.func_150699_a(String.format(StatCollector.translateToLocal("botania.versioning.startingDownload"), fileName));
      if(Minecraft.getMinecraft().thePlayer != null)
        Minecraft.getMinecraft().thePlayer.addChatMessage(component);

      VersionChecker.startedDownload = true;
View Full Code Here

Examples of net.minecraft.util.IChatComponent

    String json = StatCollector.translateToLocal("botaniamisc.shareMsg");
    json = json.replaceAll("%name%", sender.getCommandSenderName());
    json = json.replaceAll("%entry%", args[0]);
    json = json.replaceAll("%entryname%", StatCollector.translateToLocal("botania.entry." + args[0]));

    IChatComponent component = IChatComponent.Serializer.func_150699_a(json);
    MinecraftServer.getServer().getConfigurationManager().sendChatMsg(component);
  }
View Full Code Here

Examples of net.minecraft.util.IChatComponent

     * @param color The color of the message.
     * @param message The message to send.
     */
    private void sendMessage(EnumChatFormatting color, String message)
    {
        IChatComponent chat = new ChatComponentText(PluginStandardValues.PLUGIN_NAME + ": " + message);

        ChatStyle chatStyle = new ChatStyle();
        chatStyle.setColor(color);
        chat.setChatStyle(chatStyle);

        Minecraft.getMinecraft().thePlayer.addChatMessage(chat);
    }
View Full Code Here

Examples of net.minecraft.util.IChatComponent

            return DynmapCommonAPIListener.fireWebChatEvent(source, name, msg);
        }
        @Override
        public void broadcastMessage(String msg)
        {
            IChatComponent ichatcomponent = new ChatComponentText(msg);
            MinecraftServer.getServer().getConfigurationManager().sendChatMsg(ichatcomponent);
            Log.info(stripChatColor(msg));
        }
View Full Code Here

Examples of net.minecraft.util.IChatComponent

          return DynmapPlugin.this.isOp(player.getCommandSenderName());
      }
        @Override
        public void sendMessage(String msg)
        {
            IChatComponent ichatcomponent = new ChatComponentText(msg);
            player.addChatComponentMessage(ichatcomponent);
        }
View Full Code Here

Examples of net.minecraft.util.IChatComponent

        @Override
        public void sendMessage(String msg)
        {
          if(sender != null) {
                IChatComponent ichatcomponent = new ChatComponentText(msg);
              sender.addChatMessage(ichatcomponent);
          }
        }
View Full Code Here

Examples of net.minecraft.util.IChatComponent

        }
        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 {
          chat = IChatComponent.Serializer.func_150699_a("[{\"text\":\"" + text + "\",\"color\":\"aqua\"}," + "{\"text\":\" " + WHITE + "[" + GREEN
View Full Code Here

Examples of net.minecraft.util.IChatComponent

        // 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))
        {
            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.