mcMMO now supports WorldGuard, added "mcmmo" and "mcmmo-xp" flags!

This commit is contained in:
nossr50
2019-01-22 16:40:54 -08:00
parent c0dde01f3e
commit 0ad1530505
10 changed files with 377 additions and 24 deletions

View File

@ -1,6 +1,9 @@
package com.gmail.nossr50.commands.party.teleport;
import com.gmail.nossr50.WorldGuardManager;
import com.gmail.nossr50.WorldGuardUtils;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.config.WorldBlacklist;
import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
@ -41,6 +44,17 @@ public class PtpCommand implements TabExecutor {
Player player = (Player) sender;
/* WORLD GUARD MAIN FLAG CHECK */
if(WorldGuardUtils.isWorldGuardLoaded())
{
if(!WorldGuardManager.getInstance().hasMainFlag(player))
return true;
}
/* WORLD BLACKLIST CHECK */
if(WorldBlacklist.isWorldBlacklisted(player.getWorld()))
return true;
if (!UserManager.hasPlayerDataKey(player)) {
return true;
}