Skip to content

Commit

Permalink
Merge pull request #526 from BentoBoxWorld/develop
Browse files Browse the repository at this point in the history
Version 1.18.1
  • Loading branch information
tastybento authored Aug 17, 2024
2 parents 5660773 + c721de5 commit 040b55c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>2.3.0-SNAPSHOT</bentobox.version>
<bentobox.version>2.5.0-SNAPSHOT</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.18.0</build.version>
<build.version>1.18.1</build.version>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_BSkyBlock</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down
43 changes: 43 additions & 0 deletions src/main/java/world/bentobox/bskyblock/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import com.google.common.base.Enums;

import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
import world.bentobox.bentobox.api.configuration.StoreAt;
Expand Down Expand Up @@ -135,6 +136,15 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.max-islands")
private int maxIslands = -1;

@ConfigComment("The number of concurrent islands a player can have in the world")
@ConfigComment("A value of 0 will use the BentoBox config.yml default")
@ConfigEntry(path = "world.concurrent-islands")
private int concurrentIslands = 0;

@ConfigComment("Disallow players to have other islands if they are in a team.")
@ConfigEntry(path = "world.disallow-team-member-islands")
boolean disallowTeamMemberIslands = true;

@ConfigComment("The default game mode for this world. Players will be set to this mode when they create")
@ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR")
@ConfigEntry(path = "world.default-game-mode")
Expand Down Expand Up @@ -1817,4 +1827,37 @@ public void setMakeEndPortals(boolean makeEndPortals) {
this.makeEndPortals = makeEndPortals;
}

/**
* @return the concurrentIslands
*/
@Override
public int getConcurrentIslands() {
if (concurrentIslands <= 0) {
return BentoBox.getInstance().getSettings().getIslandNumber();
}
return concurrentIslands;
}

/**
* @param concurrentIslands the concurrentIslands to set
*/
public void setConcurrentIslands(int concurrentIslands) {
this.concurrentIslands = concurrentIslands;
}

/**
* @return the disallowTeamMemberIslands
*/
@Override
public boolean isDisallowTeamMemberIslands() {
return disallowTeamMemberIslands;
}

/**
* @param disallowTeamMemberIslands the disallowTeamMemberIslands to set
*/
public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) {
this.disallowTeamMemberIslands = disallowTeamMemberIslands;
}

}
2 changes: 1 addition & 1 deletion src/main/resources/addon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: BSkyBlock
main: world.bentobox.bskyblock.BSkyBlock
version: ${version}${build.number}
api-version: 1.21.0
api-version: 2.3.0
metrics: true
icon: "OAK_SAPLING"
repository: "BentoBoxWorld/BSkyBlock"
Expand Down

0 comments on commit 040b55c

Please sign in to comment.