Jump to content

superhize

Members
  • Posts

    5
  • Joined

  • Last visited

superhize's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey, i found what i want, here the code if someone want. public static String lastMessage = ""; public static int line; public static int amount; @SubscribeEvent public static void chat(ClientChatReceivedEvent event) { NewChatGui guiNewChat = (Minecraft.getInstance()).ingameGUI.getChatGUI(); if (lastMessage.equals(event.getMessage().getFormattedText())) { guiNewChat.deleteChatLine(line); amount++; lastMessage = event.getMessage().getFormattedText(); event.getMessage().appendText(TextFormatting.GRAY + " (" +TextFormatting.GOLD+"x"+ amount +TextFormatting.GRAY+ ")"); } else { amount = 1; lastMessage = event.getMessage().getFormattedText(); } line++; if (!event.isCanceled()) guiNewChat.printChatMessageWithOptionalDeletion(event.getMessage(), line); if (line > 256) line = 0; event.setCanceled(true); }
  2. Hello, i'm trying to use JSON file for my mod configuration. Actualy i use TOML, but ConfigValue does not allow HashMap. What i'm trying to do is: - Put default Question/Anwser into a hashmap (map.put("QUESTION", ANWSER");) - save default hashmap into the configuration - allow user(me) to edit the configuration to add other question without editing the code I do not know if i can do that with TOML or idk. All other things in my mode is done, i just need that, but i'm stuck. If anyone can help me, that would be great. Edit: sorry for english
  3. Ok, so far i got that: But i do not know how to get the chatId...
  4. [Reposted cause 1.8.9 is not supported here] Hello, i would like to make a mod that merge same message in chat. Instead of this i want this As i sent the same message, first message got edited and number increment. I think i need to use the ClientChatReceivedEvent but i'm not sure. I do not know how to explain this clearly, so i hope y'all understand. (if a similar mod already exist, please link it to me)
  5. Hello, i would like to make a mod that merge same message in chat. Instead of this i want this As i sent the same message, first message got edited and number increment. I think i need to use the ClientChatReceivedEvent but i'm not sure. I do not know how to explain this clearly, so i hope y'all understand. (if a similar mod already exist, please link it to me)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.