mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 06:02:12 -07:00
SPIGOT-6605: Add method to access value of enforce-whitelist
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -253,6 +253,30 @@ public final class Bukkit {
|
||||
server.setWhitelist(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the server whitelist is enforced.
|
||||
*
|
||||
* If the whitelist is enforced, non-whitelisted players will be
|
||||
* disconnected when the server whitelist is reloaded.
|
||||
*
|
||||
* @return whether the server whitelist is enforced
|
||||
*/
|
||||
public static boolean isWhitelistEnforced() {
|
||||
return server.isWhitelistEnforced();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if the server whitelist is enforced.
|
||||
*
|
||||
* If the whitelist is enforced, non-whitelisted players will be
|
||||
* disconnected when the server whitelist is reloaded.
|
||||
*
|
||||
* @param value true for enforced, false for not
|
||||
*/
|
||||
public static void setWhitelistEnforced(boolean value) {
|
||||
server.setWhitelistEnforced(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of whitelisted players.
|
||||
*
|
||||
|
@@ -208,6 +208,26 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
public void setWhitelist(boolean value);
|
||||
|
||||
/**
|
||||
* Gets whether the server whitelist is enforced.
|
||||
*
|
||||
* If the whitelist is enforced, non-whitelisted players will be
|
||||
* disconnected when the server whitelist is reloaded.
|
||||
*
|
||||
* @return whether the server whitelist is enforced
|
||||
*/
|
||||
public boolean isWhitelistEnforced();
|
||||
|
||||
/**
|
||||
* Sets if the server whitelist is enforced.
|
||||
*
|
||||
* If the whitelist is enforced, non-whitelisted players will be
|
||||
* disconnected when the server whitelist is reloaded.
|
||||
*
|
||||
* @param value true for enforced, false for not
|
||||
*/
|
||||
public void setWhitelistEnforced(boolean value);
|
||||
|
||||
/**
|
||||
* Gets a list of whitelisted players.
|
||||
*
|
||||
|
Reference in New Issue
Block a user