mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-13 11:01:57 +01:00
Don't log permission checks for console
This commit is contained in:
parent
51731cd178
commit
4dc61634bd
@ -2,6 +2,7 @@ package org.mvplugins.multiverse.core.permissions;
|
||||
|
||||
import com.dumptruckman.minecraft.util.Logging;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public final class PermissionUtils {
|
||||
|
||||
@ -39,12 +40,12 @@ public final class PermissionUtils {
|
||||
*/
|
||||
public static boolean hasPermission(CommandSender sender, String permission) {
|
||||
if (sender.hasPermission(permission)) {
|
||||
if (debugPermissions) {
|
||||
if (debugPermissions && !(sender instanceof ConsoleCommandSender)) {
|
||||
Logging.finer("Checking sender [%s] has permission [%s] : YES", sender.getName(), permission);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (debugPermissions) {
|
||||
if (debugPermissions && !(sender instanceof ConsoleCommandSender)) {
|
||||
Logging.finer("Checking sender [%s] has permission [%s] : NO", sender.getName(), permission);
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user