From 2b4417f245e96e540696b54bf716c42dbaee404f Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 6 Apr 2020 16:58:06 -0700 Subject: [PATCH] Adds support for max coop and team sizes in config.yml https://github.com/BentoBoxWorld/BentoBox/pull/1267 --- .../world/bentobox/acidisland/AISettings.java | 41 +++++++++++++++++++ src/main/resources/config.yml | 10 +++++ 2 files changed, 51 insertions(+) diff --git a/src/main/java/world/bentobox/acidisland/AISettings.java b/src/main/java/world/bentobox/acidisland/AISettings.java index 0ee7275..7417a48 100644 --- a/src/main/java/world/bentobox/acidisland/AISettings.java +++ b/src/main/java/world/bentobox/acidisland/AISettings.java @@ -319,6 +319,18 @@ public class AISettings implements WorldSettings { @ConfigEntry(path = "island.max-team-size") private int maxTeamSize = 4; + @ConfigComment("Default maximum number of coop rank members per island") + @ConfigComment("Players can have the acidisland.coop.maxsize. permission to be bigger but") + @ConfigComment("permission size cannot be less than the default below. ") + @ConfigEntry(path = "island.max-coop-size", since = "1.13.0") + private int maxCoopSize = 4; + + @ConfigComment("Default maximum number of trusted rank members per island") + @ConfigComment("Players can have the acidisland.trust.maxsize. permission to be bigger but") + @ConfigComment("permission size cannot be less than the default below. ") + @ConfigEntry(path = "island.max-trusted-size", since = "1.13.0") + private int maxTrustSize = 4; + @ConfigComment("Default maximum number of homes a player can have. Min = 1") @ConfigComment("Accessed via /ai sethome or /ai go ") @ConfigComment("Use this permission to set for specific user groups: acidisland.island.maxhomes.") @@ -1693,4 +1705,33 @@ public class AISettings implements WorldSettings { public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns) { this.ticksPerMonsterSpawns = ticksPerMonsterSpawns; } + /** + * @return the maxCoopSize + */ + @Override + public int getMaxCoopSize() { + return maxCoopSize; + } + + /** + * @param maxCoopSize the maxCoopSize to set + */ + public void setMaxCoopSize(int maxCoopSize) { + this.maxCoopSize = maxCoopSize; + } + + /** + * @return the maxTrustSize + */ + @Override + public int getMaxTrustSize() { + return maxTrustSize; + } + + /** + * @param maxTrustSize the maxTrustSize to set + */ + public void setMaxTrustSize(int maxTrustSize) { + this.maxTrustSize = maxTrustSize; + } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 19d7885..8a0bdf0 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -298,6 +298,16 @@ island: # Use this permission to set for specific user groups: acidisland.team.maxsize. # Permission size cannot be less than the default below. max-team-size: 4 + # Default maximum number of coop rank members per island + # Players can have the acidisland.coop.maxsize. permission to be bigger but + # permission size cannot be less than the default below. + # Added since 1.13.0. + max-coop-size: 4 + # Default maximum number of trusted rank members per island + # Players can have the acidisland.trust.maxsize. permission to be bigger but + # permission size cannot be less than the default below. + # Added since 1.13.0. + max-trusted-size: 4 # Default maximum number of homes a player can have. Min = 1 # Accessed via /ai sethome or /ai go # Use this permission to set for specific user groups: acidisland.island.maxhomes.