Renamed partycommand and made party chat work from galaxy to proxy

This commit is contained in:
2022-01-30 19:31:29 +01:00
parent 4f4f48e847
commit 2acebc6c16
14 changed files with 150 additions and 118 deletions
@@ -115,9 +115,9 @@ public class ChatParty implements CommandExecutor, TabCompleter {
if (party.getPartyUsers().size() > 0) {
UUID uuid = party.setNewOwner();
sender.sendMessage(Utility.parseMiniMessage("<dark_aqua>Since you own this chat party a new party owner will be chosen.<dark_aqua>"));
ChatPlugin.getInstance().getChatHandler().partyMessage(party, player, "<dark_aqua>" +
player.getName() +
" left the chat party, the new party owner is " + party.getPartyUser(uuid).getPlayerName());
// ChatPlugin.getInstance().getChatHandler().partyMessage(party, player, "<dark_aqua>" +
// player.getName() +
// " left the chat party, the new party owner is " + party.getPartyUser(uuid).getPlayerName());
} else {
party.delete();
}
@@ -20,11 +20,6 @@ public class PartyChat implements CommandExecutor {
if(!(sender instanceof Player player)) { // must be a player
return true;
}
Party party = PartyManager.getParty(player.getUniqueId());
if (party == null) {
sender.sendMessage(Utility.parseMiniMessage("<red>You are not in a party. For more info do <gold>/party</gold>.</red>"));
return true;
}
if(args.length == 0) {
// TODO: 08/08/2021 lock into party chat
@@ -36,7 +31,7 @@ public class PartyChat implements CommandExecutor {
new BukkitRunnable() {
@Override
public void run() {
ChatPlugin.getInstance().getChatHandler().partyMessage(party, player, message);
ChatPlugin.getInstance().getChatHandler().partyMessage(player, message); //TODO send over proxy
}
}.runTaskAsynchronously(ChatPlugin.getInstance());