Solved PluginMessageListener

Discussion in 'Plugin Development' started by dvargas135, Dec 5, 2015.

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


    How do I send a byte to a channel? I'm trying to block a mod

    I've tried this:
    public void onPluginMessageReceived(String channel, Player player, byte[] value) {
      if (getConfig().getBoolean("block")) {
          if (channel.equalsIgnoreCase("channel")) {
                  player.sendPluginMessage(this, "channel", new byte[] { 0x3F });
    With registering both outgoing and incoming plugin channels, as said by the mod author
    Last edited: Dec 5, 2015
  2. Offline


    What is this? Bungee?
  3. Offline


    No it isn't

    I have also tried ByteArrayDataOutput out = ByteStreams.newDataOutput();
    then out.writeByte(0x3F);
    then send the bytes as an array using out.toByteArray, but didn't work
    Last edited: Dec 5, 2015
  4. Offline


    What API/mod/thing do you use? Should this be an event?
  5. Offline



    Nevermind, got it working using byte arrays.
    Last edited by a moderator: Dec 5, 2015
  6. Offline


    Then edit the title of the thread and mark it as solved
Thread Status:
Not open for further replies.

Share This Page