Check if a user is already in a party before letting them make another party
This commit is contained in:
parent
89938338b1
commit
a0a60757f6
|
|
@ -32,6 +32,11 @@ public class Create implements SubCommand {
|
||||||
source.sendMessage(Utility.parseMiniMessage(getHelpMessage()));
|
source.sendMessage(Utility.parseMiniMessage(getHelpMessage()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (PartyManager.getParty(player.getUniqueId()) != null)
|
||||||
|
{
|
||||||
|
source.sendMessage(Utility.parseMiniMessage(Config.ALREADY_IN_PARTY));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (PartyManager.getParty(args[1]) != null) {
|
if (PartyManager.getParty(args[1]) != null) {
|
||||||
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_EXISTS, List.of(
|
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_EXISTS, List.of(
|
||||||
Template.template("party", args[1])
|
Template.template("party", args[1])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user