Skip to content

Commit

Permalink
Added coop and trust limits to config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Apr 7, 2020
1 parent 0f6650a commit 4aaba5b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/main/java/world/bentobox/skygrid/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,18 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "area.max-team-size")
private int maxTeamSize = 4;

@ConfigComment("Default maximum number of coop rank members per area")
@ConfigComment("Players can have the skygrid.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 area")
@ConfigComment("Players can have the skygrid.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;

// Reset
@ConfigComment("How many resets a player is allowed (override with /sgadmin clearresets <player>)")
@ConfigComment("Value of -1 means unlimited, 0 means hardcore - no resets.")
Expand Down Expand Up @@ -1418,4 +1430,34 @@ public void setCreateIslandOnFirstLoginAbortOnLogout(boolean createIslandOnFirst
{
this.createIslandOnFirstLoginAbortOnLogout = createIslandOnFirstLoginAbortOnLogout;
}

/**
* @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;
}
}
10 changes: 10 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,16 @@ area:
# Default max team size
# Permission size cannot be less than the default below.
max-team-size: 4
# Default maximum number of coop rank members per area
# Players can have the skygrid.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 area
# Players can have the skygrid.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
reset:
# How many resets a player is allowed (override with /sgadmin clearresets <player>)
# Value of -1 means unlimited, 0 means hardcore - no resets.
Expand Down

0 comments on commit 4aaba5b

Please sign in to comment.