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;
}
}
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 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;
}
}
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);
}
Aggregations