From a0a60757f62ccf6dc7dbc182fa52f6b25db1c625 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 30 Jan 2022 19:50:22 +0100 Subject: [PATCH] Check if a user is already in a party before letting them make another party --- .../alttd/velocitychat/commands/partysubcommands/Create.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Create.java b/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Create.java index fa011e8..785b7cc 100644 --- a/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Create.java +++ b/velocity/src/main/java/com/alttd/velocitychat/commands/partysubcommands/Create.java @@ -32,6 +32,11 @@ public class Create implements SubCommand { source.sendMessage(Utility.parseMiniMessage(getHelpMessage())); return; } + if (PartyManager.getParty(player.getUniqueId()) != null) + { + source.sendMessage(Utility.parseMiniMessage(Config.ALREADY_IN_PARTY)); + return; + } if (PartyManager.getParty(args[1]) != null) { source.sendMessage(Utility.parseMiniMessage(Config.PARTY_EXISTS, List.of( Template.template("party", args[1])