refactor: fix plugin messaging on Fabric

This commit is contained in:
William committed 2024-05-30 00:03:16 +01:00
1 parent 31620f520e
commit a3eba8407b
7 files changed
+43 -49

No files matched your search

@@ -93,7 +93,7 @@ public class PluginMessageBroker extends Broker {
return;
}
sender.sendPluginMessage(BUNGEE_CHANNEL_ID, messageWriter.toByteArray());
sender.sendPluginMessage(messageWriter.toByteArray());
}
@Override
@@ -104,7 +104,7 @@ public class PluginMessageBroker extends Broker {
outputStream.writeUTF("Connect");
outputStream.writeUTF(server);
user.sendPluginMessage(BUNGEE_CHANNEL_ID, outputStream.toByteArray());
user.sendPluginMessage(outputStream.toByteArray());
});
}
@@ -193,12 +193,11 @@ public abstract class OnlineUser extends User implements Teleportable, CommandUs
public abstract void teleportLocally(@NotNull Location location, boolean async) throws TeleportationException;
/**
* Send a plugin message to the user.
* Send a plugin message to the user on the bungee channel.
*
* @param channel channel to send it on
* @param message byte array of message data
*/
public abstract void sendPluginMessage(@NotNull String channel, byte[] message);
public abstract void sendPluginMessage(byte[] message);
/**
* Returns if a player is moving (i.e., they have momentum).