mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-30 22:53:27 +01:00
Only form data buf once in Bukkit PluginMessage messenger
This commit is contained in:
parent
b744e35ad8
commit
5db999f995
@ -69,6 +69,10 @@ public class PluginMessageMessenger implements Messenger, PluginMessageListener
|
||||
|
||||
@Override
|
||||
public void sendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage) {
|
||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
out.writeUTF(outgoingMessage.asEncodedString());
|
||||
byte[] data = out.toByteArray();
|
||||
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -78,11 +82,6 @@ public class PluginMessageMessenger implements Messenger, PluginMessageListener
|
||||
return;
|
||||
}
|
||||
|
||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
out.writeUTF(outgoingMessage.asEncodedString());
|
||||
|
||||
byte[] data = out.toByteArray();
|
||||
|
||||
p.sendPluginMessage(PluginMessageMessenger.this.plugin.getBootstrap(), CHANNEL, data);
|
||||
cancel();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user