mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
mcMMO now supports WorldGuard, added "mcmmo" and "mcmmo-xp" flags!
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user