Add limits for coop and trusted to config.yml

https://github.com/BentoBoxWorld/BentoBox/pull/1267
This commit is contained in:
tastybento 2020-04-06 17:04:44 -07:00
parent 2ce36de0bf
commit b52ceeb5ea
2 changed files with 50 additions and 0 deletions

View File

@ -36,6 +36,21 @@ public class Settings implements WorldSettings
// Section: Getters // Section: Getters
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
/**
* @return the maxCoopSize
*/
@Override
public int getMaxCoopSize() {
return maxCoopSize;
}
/**
* @return the maxTrustSize
*/
@Override
public int getMaxTrustSize() {
return maxTrustSize;
}
/** /**
* This method returns the friendlyName object. * This method returns the friendlyName object.
@ -819,6 +834,19 @@ public class Settings implements WorldSettings
// Section: Setters // Section: Setters
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
/**
* @param maxCoopSize the maxCoopSize to set
*/
public void setMaxCoopSize(int maxCoopSize) {
this.maxCoopSize = maxCoopSize;
}
/**
* @param maxTrustSize the maxTrustSize to set
*/
public void setMaxTrustSize(int maxTrustSize) {
this.maxTrustSize = maxTrustSize;
}
/** /**
* This method sets the friendlyName object value. * This method sets the friendlyName object value.
@ -2026,6 +2054,18 @@ public class Settings implements WorldSettings
@ConfigEntry(path = "cave.max-team-size") @ConfigEntry(path = "cave.max-team-size")
private int maxTeamSize = 4; private int maxTeamSize = 4;
@ConfigComment("Default maximum number of coop rank members per island")
@ConfigComment("Players can have the caveblock.coop.maxsize.<number> 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 caveblock.trust.maxsize.<number> 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("Default maximum number of homes a player can have. Min = 1")
@ConfigComment("Accessed via /cave sethome <number> or /cave go <number>") @ConfigComment("Accessed via /cave sethome <number> or /cave go <number>")
@ConfigEntry(path = "cave.max-homes") @ConfigEntry(path = "cave.max-homes")

View File

@ -279,6 +279,16 @@ cave:
# Default max team size # Default max team size
# Permission size cannot be less than the default below. # Permission size cannot be less than the default below.
max-team-size: 4 max-team-size: 4
# Default maximum number of coop rank members per island
# Players can have the caveblock.coop.maxsize.<number> 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 caveblock.trust.maxsize.<number> 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 # Default maximum number of homes a player can have. Min = 1
# Accessed via /cave sethome <number> or /cave go <number> # Accessed via /cave sethome <number> or /cave go <number>
max-homes: 1 max-homes: 1