use of net.minecraft.server.BannedPlayerList in project dynmap by webbukkit.
the class FabricServer method checkPlayerPermissions.
@Override
public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
PlayerManager scm = server.getPlayerManager();
if (scm == null)
return Collections.emptySet();
BannedPlayerList bl = scm.getUserBanList();
if (bl == null)
return Collections.emptySet();
if (bl.contains(getProfileByName(player))) {
return Collections.emptySet();
}
Set<String> rslt = plugin.hasOfflinePermissions(player, perms);
if (rslt == null) {
rslt = new HashSet<String>();
if (plugin.isOp(player)) {
rslt.addAll(perms);
}
}
return rslt;
}
use of net.minecraft.server.BannedPlayerList in project dynmap by webbukkit.
the class FabricServer method checkPlayerPermissions.
@Override
public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
PlayerManager scm = server.getPlayerManager();
if (scm == null)
return Collections.emptySet();
BannedPlayerList bl = scm.getUserBanList();
if (bl == null)
return Collections.emptySet();
if (bl.contains(getProfileByName(player))) {
return Collections.emptySet();
}
Set<String> rslt = plugin.hasOfflinePermissions(player, perms);
if (rslt == null) {
rslt = new HashSet<String>();
if (plugin.isOp(player)) {
rslt.addAll(perms);
}
}
return rslt;
}
use of net.minecraft.server.BannedPlayerList in project dynmap by webbukkit.
the class FabricServer method checkPlayerPermission.
@Override
public boolean checkPlayerPermission(String player, String perm) {
PlayerManager scm = server.getPlayerManager();
if (scm == null)
return false;
BannedPlayerList bl = scm.getUserBanList();
if (bl == null)
return false;
if (bl.contains(getProfileByName(player))) {
return false;
}
return plugin.hasOfflinePermission(player, perm);
}
use of net.minecraft.server.BannedPlayerList in project dynmap by webbukkit.
the class FabricServer method checkPlayerPermissions.
@Override
public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
PlayerManager scm = server.getPlayerManager();
if (scm == null)
return Collections.emptySet();
BannedPlayerList bl = scm.getUserBanList();
if (bl == null)
return Collections.emptySet();
if (bl.contains(getProfileByName(player))) {
return Collections.emptySet();
}
Set<String> rslt = plugin.hasOfflinePermissions(player, perms);
if (rslt == null) {
rslt = new HashSet<String>();
if (plugin.isOp(player)) {
rslt.addAll(perms);
}
}
return rslt;
}
use of net.minecraft.server.BannedPlayerList in project dynmap by webbukkit.
the class FabricServer method isPlayerBanned.
@Override
public boolean isPlayerBanned(String pid) {
PlayerManager scm = server.getPlayerManager();
BannedPlayerList bl = scm.getUserBanList();
try {
return bl.contains(getProfileByName(pid).get());
} catch (NoSuchElementException e) {
/* If this profile doesn't exist, default to "banned" for good measure. */
return true;
}
}
Aggregations