From 56926dc14ce1f073e2fde54d12fe532683b27c71 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sun, 16 Oct 2011 02:06:18 -0600 Subject: [PATCH] State when a perm has been found in debug, Fix The TeleportCommand not obeying enforce access --- .../MultiverseCore/commands/TeleportCommand.java | 2 +- .../onarandombox/MultiverseCore/utils/MVPermissions.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java index 8ed93a17..f2ff6a44 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java @@ -102,7 +102,7 @@ public class TeleportCommand extends MultiverseCommand { return; } - if (teleporter != null && !this.plugin.getMVPerms().canEnterDestination(teleporter, d)) { + if (MultiverseCore.EnforceAccess && teleporter != null && !this.plugin.getMVPerms().canEnterDestination(teleporter, d)) { if (teleportee.equals(teleporter)) { teleporter.sendMessage("Doesn't look like you're allowed to go " + ChatColor.RED + "there..."); } else { diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java b/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java index f0310ab2..7f91561d 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java @@ -135,7 +135,11 @@ public class MVPermissions implements PermissionsInterface { } Player player = (Player) sender; this.plugin.log(Level.FINEST, "Checking to see if player [" + player.getName() + "] has permission [" + node + "]"); - return sender.hasPermission(node); + boolean hasPermission = sender.hasPermission(node); + if(hasPermission) { + this.plugin.log(Level.FINER, "Player [" + player.getName() + "] HAS PERMISSION [" + node + "]!"); + } + return hasPermission; } public String getType() {