Added toggle to disable party system

This commit is contained in:
nossr50
2019-03-18 07:46:33 -07:00
parent b0b326d080
commit 3a21a913c6
6 changed files with 55 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import com.gmail.nossr50.commands.party.teleport.PtpCommand;
import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager;
@@ -59,6 +60,10 @@ public class PartyCommand implements TabExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
//If the party system is disabled, don't fire this command
if(!mcMMO.getConfigManager().getConfigParty().isPartySystemEnabled())
return true;
if (CommandUtils.noConsoleUsage(sender)) {
return true;
}