Sueta
FM

FMessageInjector

1.0.0

Change server messages in real time

·Plugin

Introduction

Have you ever thought about changing / removing messages from those plugins that do not allow you to change them? So you are in the right place!

FMessageInjector will allow you to change or remove any message that is sent from the server to the client, that is, any message that appears in the player chat!

Gif

Default config

Spoiler
Mensagens:
  worldedit:
    Mensagem: "Left click: select pos #1; Right click: select pos #2"
    Troca: "&7Clique direito: posição &c#1&7; Clique esquerdo: posição &c#2&7!"

Mensagens_RegEx:
  plugins:
    Mensagem: "Plugins \\(\\d+\\): .+"
    Troca: ""
  worldedit_1:
    Mensagem: "First position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "&7Posição #1 setada para &a$1&7, &a$3&7, &a$5&7!"

Mensagens_SendRaw:
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "{\"text\":\"Este comando não existe :(\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/ajuda\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aClique aqui para executar o comando /ajuda!\"}}"

Mensagens_RegEx_SendRaw:
  worldedit_2:
    Mensagem: "Second position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "{\"text\":\"Posição #2 setada!\",\"color\":\"gray\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&fPosição #2 setada em &a$1&f, &a$3&f, &a$5&f!\"}}"


How to configure

If you want a simple message, that is, a "Unkown command", for example, you add in the "Mensagens" section.

Example:

Spoiler
Mensagens:
  worldedit:
    Mensagem: "Left click: select pos #1; Right click: select pos #2"
    Troca: "&7Clique direito: posição &c#1&7; Clique esquerdo: posição &c#2&7!"
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "&cEste comando não existe!"

Mensagens_RegEx:
  plugins:
    Mensagem: "Plugins \\(\\d+\\): .+"
    Troca: ""
  worldedit_1:
    Mensagem: "First position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "&7Posição #1 setada para &a$1&7, &a$3&7, &a$5&7!"

Mensagens_SendRaw:
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "{\"text\":\"Este comando não existe :(\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/ajuda\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aClique aqui para executar o comando /ajuda!\"}}"

Mensagens_RegEx_SendRaw:
  worldedit_2:
    Mensagem: "Second position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "{\"text\":\"Posição #2 setada!\",\"color\":\"gray\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&fPosição #2 setada em &a$1&f, &a$3&f, &a$5&f!\"}}"

If you want a more complex message, use Regex!

Add an entry in the Messages_RegEx section

Tip: you can use the Regex Pal site to create your regular expressions more easily!

Note: when typing an "Escaped character", instead of using only one \, use two.

Example:

Spoiler
Mensagens:
  worldedit:
    Mensagem: "Left click: select pos #1; Right click: select pos #2"
    Troca: "&7Clique direito: posição &c#1&7; Clique esquerdo: posição &c#2&7!"

Mensagens_RegEx:
  mobs:
    Mensagem: "Killed \\(\\d+\\) mobs"
    Troca: "&7Você matou &a$1 &7mobs!"
  plugins:
    Mensagem: "Plugins \\(\\d+\\): .+"
    Troca: ""
  worldedit_1:
    Mensagem: "First position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "&7Posição #1 setada para &a$1&7, &a$3&7, &a$5&7!"

Mensagens_SendRaw:
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "{\"text\":\"Este comando não existe :(\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/ajuda\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aClique aqui para executar o comando /ajuda!\"}}"

Mensagens_RegEx_SendRaw:
  worldedit_2:
    Mensagem: "Second position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "{\"text\":\"Posição #2 setada!\",\"color\":\"gray\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&fPosição #2 setada em &a$1&f, &a$3&f, &a$5&f!\"}}"

If you want to send a "Raw" message, use the "Mensagens_SendRaw" section.

You can create your Raw on Minecraft.tools website!

Note: When paste in the plugin config, select the pasted text, press Ctrl + H, check the "In the selection" box, in the "Find" box, place a ", in the" Replace with" box, place a \"

Example:

Spoiler
Mensagens:
  worldedit:
    Mensagem: "Left click: select pos #1; Right click: select pos #2"
    Troca: "&7Clique direito: posição &c#1&7; Clique esquerdo: posição &c#2&7!"

Mensagens_RegEx:
  plugins:
    Mensagem: "Plugins \\(\\d+\\): .+"
    Troca: ""
  worldedit_1:
    Mensagem: "First position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "&7Posição #1 setada para &a$1&7, &a$3&7, &a$5&7!"

Mensagens_SendRaw:
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "{\"text\":\"Este comando não existe :(\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/ajuda\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aClique aqui para executar o comando /ajuda!\"}}"
  exemplo:
    Mensagem: "Uma mensagem de exemplo"
    Troca: "{\"text\":\"O plugin FMessageInjector é TOP!\",\"color\":\"red\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&7Criado por zFork!\"}}"

Mensagens_RegEx_SendRaw:
  worldedit_2:
    Mensagem: "Second position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "{\"text\":\"Posição #2 setada!\",\"color\":\"gray\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&fPosição #2 setada em &a$1&f, &a$3&f, &a$5&f!\"}}"

If you want to send a "Raw" message with a RegEx check, use the "Mensagens_RegEx_SendRaw" section.

Example:

Spoiler
Mensagens:
  worldedit:
    Mensagem: "Left click: select pos #1; Right click: select pos #2"
    Troca: "&7Clique direito: posição &c#1&7; Clique esquerdo: posição &c#2&7!"

Mensagens_RegEx:
  plugins:
    Mensagem: "Plugins \\(\\d+\\): .+"
    Troca: ""
  worldedit_1:
    Mensagem: "First position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "&7Posição #1 setada para &a$1&7, &a$3&7, &a$5&7!"

Mensagens_SendRaw:
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "{\"text\":\"Este comando não existe :(\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/ajuda\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aClique aqui para executar o comando /ajuda!\"}}"

Mensagens_RegEx_SendRaw:
  worldedit_2:
    Mensagem: "Second position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "{\"text\":\"Posição #2 setada!\",\"color\":\"gray\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&fPosição #2 setada em &a$1&f, &a$3&f, &a$5&f!\"}}"
  playerjoin:
    Mensagem: "([a-zA-Z0-9_-]) entrou no servidor"
    Troca: "{\"text\":\"Um player entrou!\",\"color\":\"white\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aPlayer: $1\"}}"

Possible doubts

P: Dery, never in my life will I use the Mensagens_RegEx_SendRaw section, what do I do?
A: Delete what's inside it, for example:

Spoiler
Mensagens:
  worldedit:
    Mensagem: "Left click: select pos #1; Right click: select pos #2"
    Troca: "&7Clique direito: posição &c#1&7; Clique esquerdo: posição &c#2&7!"

Mensagens_RegEx:
  plugins:
    Mensagem: "Plugins \\(\\d+\\): .+"
    Troca: ""
  worldedit_1:
    Mensagem: "First position set to \\((-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?), (-?\\d+(\\.\\d+)?)\\)( \\(\\d+\\))?\\."
    Troca: "&7Posição #1 setada para &a$1&7, &a$3&7, &a$5&7!"

Mensagens_SendRaw:
  unkowncommand:
    Mensagem: "Unknown command. Type \"/help\" for help."
    Troca: "{\"text\":\"Este comando não existe :(\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/ajuda\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"&aClique aqui para executar o comando /ajuda!\"}}"

Mensagens_RegEx_SendRaw:

Donations
Click here

I apologize config in Portuguese and the possible spelling mistakes. I am Brazilian and I used Google Translate to translate the text into English!

Similar projects

Plugin →