Config option to ignore custom limits perms

This commit is contained in:
YellowZaki 2020-02-18 18:40:00 +01:00
parent 8e21458a7a
commit 4a10db503a
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,9 @@ public class JoinListener implements Listener {
} }
private void checkPerms(Player player, String permissionPrefix, String islandId, String gameMode) { private void checkPerms(Player player, String permissionPrefix, String islandId, String gameMode) {
if (!addon.getConfig().getBoolean("usepermissions", true)) {
return;
}
IslandBlockCount ibc = addon.getBlockLimitListener().getIsland(islandId); IslandBlockCount ibc = addon.getBlockLimitListener().getIsland(islandId);
if (ibc != null) { if (ibc != null) {
// Clear permission limits // Clear permission limits

View File

@ -10,6 +10,10 @@ gamemodes:
# example: bskyblock.island.limit.hopper.10 # example: bskyblock.island.limit.hopper.10
# permission activates when player logs in. # permission activates when player logs in.
# #
#¿Do you want to use perms to add custom limits to islands?
#Set it to false if you are a developer and want to handle the custom limit via code
usepermissions: true
# Cooldown for player recount command in seconds # Cooldown for player recount command in seconds
cooldown: 120 cooldown: 120