Add bonus log messages for teleport permissions

This commit is contained in:
Tim Ekl 2011-12-21 22:44:26 -06:00
parent a092dd8760
commit 2879c2a96e

View File

@ -138,6 +138,8 @@ public class MVPlayerListener extends PlayerListener {
@Override
public void onPlayerTeleport(PlayerTeleportEvent event) {
this.plugin.log(Level.FINEST, "Got teleport event for player '" + event.getPlayer().getName() + "' with cause '" + event.getCause() + "'");
if (event.isCancelled()) {
return;
}
@ -167,6 +169,8 @@ public class MVPlayerListener extends PlayerListener {
if (event.isCancelled() && teleporter != null) {
this.plugin.log(Level.FINE, "Player '" + teleportee.getName() + "' was DENIED ACCESS to '" + event.getTo().getWorld().getName() +
"' because '" + teleporter.getName() + "' don't have: multiverse.access." + event.getTo().getWorld().getName());
} else {
this.plugin.log(Level.FINE, "Player '" + teleportee.getName() + "' was allowed to go to '" + event.getTo().getWorld().getName() + "' under normal circumstances.");
}
} else {
this.plugin.log(Level.FINE, "Player '" + teleportee.getName() + "' was allowed to go to '" + event.getTo().getWorld().getName() + "' because enforceaccess is off.");