Hide chat messages with external plugins?

Discussion in 'Plugin Development' started by Meatiex, Jan 3, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Meatiex

    Is their any way to disable chat messages from plotme and worldedit?

    The only way I can think of is to copy all the command code over to my plugin and removing the messages their...(using plotme.jar and worldedit.jar as an API)

    I'm using this instead of chat messages for almost all commands in my plugin:
    Code:
          public static void send(Player p, String msg) {
            String s = ChatColor.translateAlternateColorCodes('&', msg);
            IChatBaseComponent icbc = ChatSerializer.a("{\"text\": \"" + s + "\"}");
            PacketPlayOutChat bar = new PacketPlayOutChat(icbc, (byte)2);
            ((CraftPlayer)p).getHandle().playerConnection.sendPacket(bar);
          }
    Literally the only thing chat is used for in my plugin is players chating, /msg and /help

    Any help is awesome :D
     
  2. Offline

    Totom3

    @Meatiex I suggest you decompile World Edit and PlotMe, remove the Player#sendMessage() instructions and recompile. Simplest way I can think of.
     
    Meatiex likes this.
Thread Status:
Not open for further replies.

Share This Page