started migrating party to proxy

This commit is contained in:
2022-01-30 02:12:09 +01:00
parent 57a43e9c1c
commit daf6ab21a5
9 changed files with 459 additions and 17 deletions
@@ -193,7 +193,7 @@ public class ChatHandler {
Template.template("[i]", itemComponent(player.getInventory().getItemInMainHand()))));
Component component = Utility.parseMiniMessage(Config.PARTY_FORMAT, templates);
sendPartyMessage(player, party.getPartyId(), component);
// sendPartyMessage(player, party.getPartyId(), component);
Component spyMessage = Utility.parseMiniMessage(Config.PARTY_SPY, templates);
for(Player pl : Bukkit.getOnlinePlayers()) {
@@ -238,15 +238,6 @@ public class ChatHandler {
player.sendPluginMessage(plugin, Config.MESSAGECHANNEL, out.toByteArray());
}
private void sendPartyMessage(Player player, int partyId, Component component) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("party");
out.writeUTF(String.valueOf(partyId));
out.writeUTF(player.getUniqueId().toString());
out.writeUTF(GsonComponentSerializer.gson().serialize(component));
player.sendPluginMessage(plugin, Config.MESSAGECHANNEL, out.toByteArray());
}
// Start - move these to util
private boolean isMuted(Player player, String message, String prefix) {