From 367a3f996d91c96325d14fa277b991bf7b344ddc Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 18 Aug 2024 16:03:41 -0700 Subject: [PATCH 1/9] Version 2.1.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a86217f..2c54c71 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ -LOCAL - 2.1.0 + 2.1.1 BentoBoxWorld_SkyGrid bentobox-world From 1147a911819d6974dab423c485bddbeb668fc94d Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 18 Aug 2024 16:04:49 -0700 Subject: [PATCH 2/9] Add BentoBox API settings https://github.com/BentoBoxWorld/BentoBox/issues/2470 --- .../java/world/bentobox/skygrid/Settings.java | 37 +++++++++++++++++++ src/main/resources/addon.yml | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 3808aaf..20e804b 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -147,6 +147,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 +1651,32 @@ public int getEndFrameHeight() { public void setEndFrameHeight(int endFrameHeight) { this.endFrameHeight = endFrameHeight; } + + /** + * @return the concurrentIslands + */ + public int getConcurrentIslands() { + 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/resources/addon.yml b/src/main/resources/addon.yml index 1f9b41e..66e2bdf 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.4.1 authors: tastybento From 440d9a82a093738c0e510e7c998292d38295bdb6 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 20 Aug 2024 20:52:39 -0700 Subject: [PATCH 3/9] Fix concurrent island limit --- src/main/java/world/bentobox/skygrid/Settings.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 20e804b..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; @@ -1656,6 +1657,9 @@ public void setEndFrameHeight(int endFrameHeight) { * @return the concurrentIslands */ public int getConcurrentIslands() { + if (concurrentIslands <= 0) { + return BentoBox.getInstance().getSettings().getIslandNumber(); + } return concurrentIslands; } From 2f02261db5459cf520907d3ff1a242f9d17093d2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 8 Sep 2024 08:40:28 -0700 Subject: [PATCH 4/9] Return addon that was created --- src/main/java/world/bentobox/skygrid/SkyGridPladdon.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } } From ee438be97a8a9802ff88d81cee41eb64c016174e Mon Sep 17 00:00:00 2001 From: tastybento Date: Fri, 8 Nov 2024 14:55:50 -0800 Subject: [PATCH 5/9] Version 2.2.0 and update to MC 1.21.3 --- pom.xml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 2c54c71..57539af 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 + 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.1 + 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 From 63403a7dca3f6f18d948b7f91e2a4994908d9ce7 Mon Sep 17 00:00:00 2001 From: tastybento Date: Fri, 8 Nov 2024 14:56:05 -0800 Subject: [PATCH 6/9] Use new biomes --- .../skygrid/generators/SkyGridPop.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) 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); From bf90fc70feeee5624c2d6647f7915a87d011596a Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 10 Nov 2024 14:57:36 -0800 Subject: [PATCH 7/9] Fix codemc id --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57539af..6412c09 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ - codemc-releases + bentoboxworld https://repo.codemc.org/repository/bentoboxworld/ From bc434883d6d8eb6d22bdbce4bfa1ac27df83cac9 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 24 Nov 2024 13:49:56 -0800 Subject: [PATCH 8/9] Put API requirements into config files --- src/main/resources/addon.yml | 2 +- src/main/resources/plugin.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 66e2bdf..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: 2.4.1 +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"] From 33228714fca1ac7d036b1ddbd1678fb975ffdfe1 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 24 Nov 2024 13:53:11 -0800 Subject: [PATCH 9/9] Remove problematic Vault reference --- pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pom.xml b/pom.xml index 6412c09..7a52bf4 100644 --- a/pom.xml +++ b/pom.xml @@ -170,14 +170,6 @@ ${bentobox.version} provided - - - net.milkbowl.vault - VaultAPI - 1.7 - provided - -