Skip to content

Commit 4dc6163

Browse files
committed
Don't log permission checks for console
1 parent 51731cd commit 4dc6163

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/mvplugins/multiverse/core/permissions/PermissionUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.dumptruckman.minecraft.util.Logging;
44
import org.bukkit.command.CommandSender;
5+
import org.bukkit.command.ConsoleCommandSender;
56

67
public final class PermissionUtils {
78

@@ -39,12 +40,12 @@ public static String concatPermission(String permission, String... child) {
3940
*/
4041
public static boolean hasPermission(CommandSender sender, String permission) {
4142
if (sender.hasPermission(permission)) {
42-
if (debugPermissions) {
43+
if (debugPermissions && !(sender instanceof ConsoleCommandSender)) {
4344
Logging.finer("Checking sender [%s] has permission [%s] : YES", sender.getName(), permission);
4445
}
4546
return true;
4647
}
47-
if (debugPermissions) {
48+
if (debugPermissions && !(sender instanceof ConsoleCommandSender)) {
4849
Logging.finer("Checking sender [%s] has permission [%s] : NO", sender.getName(), permission);
4950
}
5051
return false;

0 commit comments

Comments
 (0)