diff --git a/src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java b/src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java index ae91ecd9..2fa2c4ce 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java @@ -19,19 +19,18 @@ package com.sk89q.worldguard.bukkit; -import static com.sk89q.worldguard.bukkit.BukkitUtil.toVector; - -import java.util.HashMap; -import java.util.Map; - -import org.bukkit.GameMode; -import org.bukkit.World; -import org.bukkit.entity.Player; - import com.sk89q.worldedit.Vector; import com.sk89q.worldguard.protection.ApplicableRegionSet; import com.sk89q.worldguard.protection.flags.DefaultFlag; import com.sk89q.worldguard.protection.managers.RegionManager; +import org.bukkit.GameMode; +import org.bukkit.World; +import org.bukkit.entity.Player; + +import java.util.HashMap; +import java.util.Map; + +import static com.sk89q.worldguard.bukkit.BukkitUtil.toVector; /** * This processes per-player state information and is also meant to be used @@ -83,10 +82,8 @@ public void run() { } Vector playerLocation = toVector(player.getLocation()); - RegionManager regionManager = plugin.getGlobalRegionManager() - .get(player.getWorld()); - ApplicableRegionSet applicable = regionManager - .getApplicableRegions(playerLocation); + RegionManager regionManager = plugin.getGlobalRegionManager().get(player.getWorld()); + ApplicableRegionSet applicable = regionManager.getApplicableRegions(playerLocation); if (!RegionQueryUtil.isInvincible(plugin, player, applicable) && !plugin.getGlobalStateManager().hasGodMode(player) diff --git a/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionCommands.java b/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionCommands.java index dce514d9..9d00e25e 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionCommands.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionCommands.java @@ -708,9 +708,6 @@ public void flag(CommandContext args, CommandSender sender) throws CommandExcept // Need to build a list for (Flag flag : DefaultFlag.getFlags()) { - if (list.length() > 0) { - list.append(", "); - } // @TODO deprecate inconsistant "owner" permission if (region.isOwner(localPlayer)) { @@ -730,8 +727,11 @@ public void flag(CommandContext args, CommandSender sender) throws CommandExcept + flag.getName() + "." + id.toLowerCase())) { continue; } - } - + } + + if (list.length() > 0) { + list.append(", "); + } list.append(flag.getName()); }