#2572: Add additional APIs regarding server restriction
This commit is contained in:
@@ -69,11 +69,17 @@ public class BungeeServerInfo implements ServerInfo
|
||||
return Collections.unmodifiableCollection( new HashSet<>( players ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermission()
|
||||
{
|
||||
return "bungeecord.server." + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAccess(CommandSender player)
|
||||
{
|
||||
Preconditions.checkNotNull( player, "player" );
|
||||
return !restricted || player.hasPermission( "bungeecord.server." + name );
|
||||
return !restricted || player.hasPermission( getPermission() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user