mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-19 21:06:03 +00:00
SPIGOT-6605: Add method to access value of enforce-whitelist
This commit is contained in:
parent
ecf35dd77a
commit
214b9f14e8
2 changed files with 44 additions and 0 deletions
|
@ -253,6 +253,30 @@ public final class Bukkit {
|
||||||
server.setWhitelist(value);
|
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.
|
* Gets a list of whitelisted players.
|
||||||
*
|
*
|
||||||
|
|
|
@ -208,6 +208,26 @@ public interface Server extends PluginMessageRecipient {
|
||||||
*/
|
*/
|
||||||
public void setWhitelist(boolean value);
|
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.
|
* Gets a list of whitelisted players.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue