Party system can now be disabled via config

Closes #4873
This commit is contained in:
nossr50
2024-02-19 17:55:57 -08:00
parent c358c8ce0b
commit 3361d28887
34 changed files with 478 additions and 433 deletions

View File

@@ -2,6 +2,7 @@ package com.gmail.nossr50.commands.party;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.party.PartyManager;
import com.gmail.nossr50.util.player.UserManager;
import org.bukkit.command.Command;
@@ -26,16 +27,16 @@ public class PartyCreateCommand implements CommandExecutor {
}
// Check to see if the party exists, and if it does cancel creating a new party
if (PartyManager.checkPartyExistence(player, args[1])) {
if (mcMMO.p.getPartyManager().checkPartyExistence(player, args[1])) {
return true;
}
// Changing parties
if (!PartyManager.changeOrJoinParty(mcMMOPlayer, args[1])) {
if (!mcMMO.p.getPartyManager().changeOrJoinParty(mcMMOPlayer, args[1])) {
return true;
}
PartyManager.createParty(mcMMOPlayer, args[1], getPassword(args));
mcMMO.p.getPartyManager().createParty(mcMMOPlayer, args[1], getPassword(args));
return true;
default: