mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-25 01:57:53 +01:00
remove debug logging
This commit is contained in:
parent
8763ad91e4
commit
a2951b798d
@ -11,15 +11,12 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
public class FabricPermissions implements PermissionProvider {
|
public class FabricPermissions implements PermissionProvider {
|
||||||
|
|
||||||
private final JSONParser parser = new JSONParser();
|
|
||||||
|
|
||||||
private String permissionKey(String perm) {
|
private String permissionKey(String perm) {
|
||||||
return "dynmap." + perm;
|
return "dynmap." + perm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
|
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
|
||||||
Log.info("Requesting offline permissions: " + String.join(",", perms) + " for " + player);
|
|
||||||
return perms.stream()
|
return perms.stream()
|
||||||
.filter(perm -> hasOfflinePermission(player, perm))
|
.filter(perm -> hasOfflinePermission(player, perm))
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
@ -27,13 +24,11 @@ public class FabricPermissions implements PermissionProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasOfflinePermission(String player, String perm) {
|
public boolean hasOfflinePermission(String player, String perm) {
|
||||||
Log.info("Requesting offline permission: " + perm + " for " + player);
|
|
||||||
return DynmapPlugin.plugin.isOp(player.toLowerCase());
|
return DynmapPlugin.plugin.isOp(player.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean has(PlayerEntity player, String permission) {
|
public boolean has(PlayerEntity player, String permission) {
|
||||||
Log.info("Requesting privilege: " + permission);
|
|
||||||
if (player == null) return false;
|
if (player == null) return false;
|
||||||
String name = player.getName().getString().toLowerCase();
|
String name = player.getName().getString().toLowerCase();
|
||||||
if (DynmapPlugin.plugin.isOp(name)) return true;
|
if (DynmapPlugin.plugin.isOp(name)) return true;
|
||||||
@ -44,10 +39,8 @@ public class FabricPermissions implements PermissionProvider {
|
|||||||
public boolean hasPermissionNode(PlayerEntity player, String permission) {
|
public boolean hasPermissionNode(PlayerEntity player, String permission) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
String name = player.getName().getString().toLowerCase();
|
String name = player.getName().getString().toLowerCase();
|
||||||
Log.info("Requesting permission node: " + permission + " for " + name);
|
|
||||||
return DynmapPlugin.plugin.isOp(name);
|
return DynmapPlugin.plugin.isOp(name);
|
||||||
}
|
}
|
||||||
Log.info("Requesting permission node: " + permission);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ public class LuckPermissions implements PermissionProvider {
|
|||||||
JSONObject user = (JSONObject) it;
|
JSONObject user = (JSONObject) it;
|
||||||
if (user.get("name").toString().equalsIgnoreCase(username)) {
|
if (user.get("name").toString().equalsIgnoreCase(username)) {
|
||||||
String uuid = user.get("uuid").toString();
|
String uuid = user.get("uuid").toString();
|
||||||
Log.info("Found cached UUID for " + username + ": " + uuid);
|
|
||||||
return Optional.of(UUID.fromString(uuid));
|
return Optional.of(UUID.fromString(uuid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -66,7 +65,6 @@ public class LuckPermissions implements PermissionProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
|
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
|
||||||
Log.info("Requesting offline permissions: " + String.join(",", perms) + " for " + player);
|
|
||||||
return perms.stream()
|
return perms.stream()
|
||||||
.filter(perm -> hasOfflinePermission(player, perm))
|
.filter(perm -> hasOfflinePermission(player, perm))
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
@ -74,7 +72,6 @@ public class LuckPermissions implements PermissionProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasOfflinePermission(String player, String perm) {
|
public boolean hasOfflinePermission(String player, String perm) {
|
||||||
Log.info("Requesting offline permission: " + perm + " for " + player);
|
|
||||||
if (DynmapPlugin.plugin.isOp(player.toLowerCase())) return true;
|
if (DynmapPlugin.plugin.isOp(player.toLowerCase())) return true;
|
||||||
Optional<LuckPerms> api = getApi();
|
Optional<LuckPerms> api = getApi();
|
||||||
Optional<UUID> uuid = cachedUUID(player);
|
Optional<UUID> uuid = cachedUUID(player);
|
||||||
@ -87,7 +84,6 @@ public class LuckPermissions implements PermissionProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean has(PlayerEntity player, String permission) {
|
public boolean has(PlayerEntity player, String permission) {
|
||||||
Log.info("Requesting privilege: " + permission);
|
|
||||||
if (player == null) return false;
|
if (player == null) return false;
|
||||||
String name = player.getName().getString().toLowerCase();
|
String name = player.getName().getString().toLowerCase();
|
||||||
if (DynmapPlugin.plugin.isOp(name)) return true;
|
if (DynmapPlugin.plugin.isOp(name)) return true;
|
||||||
@ -98,10 +94,8 @@ public class LuckPermissions implements PermissionProvider {
|
|||||||
public boolean hasPermissionNode(PlayerEntity player, String permission) {
|
public boolean hasPermissionNode(PlayerEntity player, String permission) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
String name = player.getName().getString().toLowerCase();
|
String name = player.getName().getString().toLowerCase();
|
||||||
Log.info("Requesting permission node: " + permission + " for " + name);
|
|
||||||
return DynmapPlugin.plugin.isOp(name);
|
return DynmapPlugin.plugin.isOp(name);
|
||||||
}
|
}
|
||||||
Log.info("Requesting permission node: " + permission);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user