diff --git a/pom.xml b/pom.xml
index a86217f..7a52bf4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,13 +41,9 @@
-
- codemc-snapshots
- https://repo.codemc.org/repository/maven-snapshots
-
- codemc-releases
- https://repo.codemc.org/repository/maven-releases
+ bentoboxworld
+ https://repo.codemc.org/repository/bentoboxworld/
@@ -58,14 +54,14 @@
2.0.9
- 1.21-R0.1-SNAPSHOT
- 2.4.1-SNAPSHOT
+ 1.21.3-R0.1-SNAPSHOT
+ 2.7.1-SNAPSHOT
${build.version}-SNAPSHOT
-LOCAL
- 2.1.0
+ 2.2.0
BentoBoxWorld_SkyGrid
bentobox-world
@@ -133,7 +129,7 @@
codemc-repo
- https://repo.codemc.org/repository/maven-public/
+ https://repo.codemc.org/repository/bentoboxworld/
vault-repo
@@ -174,14 +170,6 @@
${bentobox.version}
provided
-
-
- net.milkbowl.vault
- VaultAPI
- 1.7
- provided
-
-
diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java
index 3808aaf..f010115 100644
--- a/src/main/java/world/bentobox/skygrid/Settings.java
+++ b/src/main/java/world/bentobox/skygrid/Settings.java
@@ -15,6 +15,7 @@
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
+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;
@@ -147,6 +148,15 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.skygrid-height")
private int islandHeight = 128;
+ @ConfigComment("The number of concurrent areas a player can have")
+ @ConfigComment("A value of 0 will use the BentoBox config.yml default")
+ @ConfigEntry(path = "world.concurrent-area")
+ private int concurrentIslands = 0;
+
+ @ConfigComment("Disallow team members from having their own area.")
+ @ConfigEntry(path = "world.disallow-team-member-areas")
+ private boolean disallowTeamMemberIslands = true;
+
@ConfigComment("End Frame height")
@ConfigComment("This is the height where end frames will generate.")
@ConfigEntry(path = "world.end-frame-height", since = "1.20.0")
@@ -1642,4 +1652,35 @@ public int getEndFrameHeight() {
public void setEndFrameHeight(int endFrameHeight) {
this.endFrameHeight = endFrameHeight;
}
+
+ /**
+ * @return the concurrentIslands
+ */
+ 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
+ */
+ public boolean isDisallowTeamMemberIslands() {
+ return disallowTeamMemberIslands;
+ }
+
+ /**
+ * @param disallowTeamMemberIslands the disallowTeamMemberIslands to set
+ */
+ public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) {
+ this.disallowTeamMemberIslands = disallowTeamMemberIslands;
+ }
}
diff --git a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java
index 9368da8..9cb4c37 100644
--- a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java
+++ b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java
@@ -7,8 +7,13 @@
public class SkyGridPladdon extends Pladdon {
+ private SkyGrid addon;
+
@Override
public Addon getAddon() {
- return new SkyGrid();
+ if (addon == null) {
+ addon = new SkyGrid();
+ }
+ return addon;
}
}
diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java
index 8a6cba7..3cbb018 100644
--- a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java
+++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java
@@ -174,18 +174,18 @@ private void setFrame(LimitedRegion region, int xx, int yy, int zz) {
private void setSaplingType(LimitedRegion region, Location loc) {
// Set sapling type if there is one specific to this biome
- Material sapling = switch (region.getBiome(loc)) {
- case JUNGLE -> Material.JUNGLE_SAPLING;
- case PLAINS -> random.nextBoolean() ? Material.BIRCH_SAPLING : Material.OAK_SAPLING;
- case TAIGA -> Material.SPRUCE_SAPLING;
- case SWAMP -> Material.MANGROVE_PROPAGULE;
- case DESERT -> Material.DEAD_BUSH;
- case BADLANDS -> Material.DEAD_BUSH;
- case CHERRY_GROVE -> Material.CHERRY_SAPLING;
- case BAMBOO_JUNGLE -> Material.BAMBOO;
- case SAVANNA -> Material.ACACIA_SAPLING; // Acacia
- case BIRCH_FOREST -> Material.BIRCH_SAPLING;
- case MUSHROOM_FIELDS -> random.nextBoolean() ? Material.RED_MUSHROOM : Material.BROWN_MUSHROOM;
+ Material sapling = switch (region.getBiome(loc).getKey().getKey()) {
+ case "jungle" -> Material.JUNGLE_SAPLING;
+ case "plains" -> random.nextBoolean() ? Material.BIRCH_SAPLING : Material.OAK_SAPLING;
+ case "taiga" -> Material.SPRUCE_SAPLING;
+ case "swamp" -> Material.MANGROVE_PROPAGULE;
+ case "desert" -> Material.DEAD_BUSH;
+ case "badlands" -> Material.DEAD_BUSH;
+ case "cherry_grove" -> Material.CHERRY_SAPLING;
+ case "bamboo_jungle" -> Material.BAMBOO;
+ case "savana" -> Material.ACACIA_SAPLING; // Acacia
+ case "birch_forest" -> Material.BIRCH_SAPLING;
+ case "mushroom_fields" -> random.nextBoolean() ? Material.RED_MUSHROOM : Material.BROWN_MUSHROOM;
default -> SAPLING_TYPE[random.nextInt(6)];
};
region.setType(loc.add(new Vector(0, 1, 0)), sapling);
diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml
index 1f9b41e..40431a4 100755
--- a/src/main/resources/addon.yml
+++ b/src/main/resources/addon.yml
@@ -4,7 +4,7 @@ version: ${version}${build.number}
metrics: true
repository: "BentoBoxWorld/SkyGrid"
icon: "COBWEB"
-api-version: 1.21
+api-version: 2.7.1
authors: tastybento
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 277f996..d3ed862 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,7 +1,7 @@
name: BentoBox-SkyGrid
main: world.bentobox.skygrid.SkyGridPladdon
version: ${project.version}${build.number}
-api-version: "1.19"
+api-version: "1.21"
authors: [tastybento]
contributors: ["The BentoBoxWorld Community"]