Skip to content

Commit

Permalink
Merge pull request #408 from BentoBoxWorld/develop
Browse files Browse the repository at this point in the history
Release 1.18.0
  • Loading branch information
tastybento authored Nov 16, 2024
2 parents bac04f0 + 55ac3d6 commit 27d8b29
Show file tree
Hide file tree
Showing 19 changed files with 1,132 additions and 920 deletions.
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@
</issueManagement>

<distributionManagement>
<snapshotRepository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.org/repository/maven-snapshots</url>
</snapshotRepository>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.org/repository/maven-releases</url>
<id>bentoboxworld</id>
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
</repository>
</distributionManagement>

Expand All @@ -58,16 +54,16 @@
<!-- Non-minecraft related dependencies -->
<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>
<spigot.version>1.21.3-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>2.7.1-SNAPSHOT</bentobox.version>
<level.version>2.6.2</level.version>
<bank.version>1.3.0</bank.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.17.0</build.version>
<build.version>1.18.0</build.version>
<!-- SonarCloud -->
<sonar.projectKey>BentoBoxWorld_AOneBlock</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down Expand Up @@ -133,6 +129,10 @@
<id>minecraft-repo</id>
<url>https://libraries.minecraft.net/</url>
</repository>
<repository>
<id>bentoboxworld</id>
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
</repository>
<repository>
<id>codemc</id>
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
Expand Down
41 changes: 32 additions & 9 deletions src/main/java/world/bentobox/aoneblock/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;

import com.google.common.base.Enums;

import world.bentobox.aoneblock.listeners.BlockListener;
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 @@ -196,9 +195,14 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.island-height")
private int islandHeight = 120;

@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 team members from having their own islands.")
@ConfigEntry(path = "world.disallow-team-member-islands")
private boolean disallowTeamMemberIslands = false;
private boolean disallowTeamMemberIslands = true;

@ConfigComment("Use your own world generator for this world.")
@ConfigComment("In this case, the plugin will not generate anything.")
Expand Down Expand Up @@ -226,13 +230,13 @@ public class Settings implements WorldSettings {

@ConfigComment("The default biome for the overworld")
@ConfigEntry(path = "world.default-biome")
private Biome defaultBiome = Biome.PLAINS;
private Biome defaultBiome;
@ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)")
@ConfigEntry(path = "world.default-nether-biome")
private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER").or(Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.BADLANDS));
private Biome defaultNetherBiome;
@ConfigComment("The default biome for the end world (this may affect what mobs can spawn)")
@ConfigEntry(path = "world.default-end-biome")
private Biome defaultEndBiome = Biome.THE_END;
private Biome defaultEndBiome;

@ConfigComment("The maximum number of players a player can ban at any one time in this game mode.")
@ConfigComment("The permission acidisland.ban.maxlimit.X where X is a number can also be used per player")
Expand Down Expand Up @@ -1440,7 +1444,7 @@ public boolean isWaterUnsafe() {
* @return default biome
*/
public Biome getDefaultBiome() {
return defaultBiome;
return defaultBiome == null ? Biome.PLAINS : defaultBiome;
}

/**
Expand Down Expand Up @@ -1885,7 +1889,7 @@ public void setDropOnTop(boolean dropOnTop) {
* @return the defaultNetherBiome
*/
public Biome getDefaultNetherBiome() {
return defaultNetherBiome;
return defaultNetherBiome == null ? Biome.NETHER_WASTES : defaultNetherBiome;
}

/**
Expand All @@ -1899,7 +1903,7 @@ public void setDefaultNetherBiome(Biome defaultNetherBiome) {
* @return the defaultEndBiome
*/
public Biome getDefaultEndBiome() {
return defaultEndBiome;
return defaultEndBiome == null ? Biome.THE_END : defaultEndBiome;
}

/**
Expand Down Expand Up @@ -2213,4 +2217,23 @@ public String getOffset() {
public void setOffset(String offset) {
this.offset = offset;
}

/**
* @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;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ else if (Material.BEDROCK.equals(island.getCenter().getBlock().getType()) ||
for (double x = 0.0; x <= 1.0; x += 0.5) {
for (double y = 0.0; y <= 1.0; y += 0.5) {
for (double z = 0.0; z < 1.0; z += 0.5) {
island.getWorld().spawnParticle(Particle.REDSTONE, island.getCenter().add(new Vector(x, y, z)),
island.getWorld().spawnParticle(Particle.DUST, island.getCenter().add(new Vector(x, y, z)),
5, 0.1, 0, 0.1, 1, new Particle.DustOptions(BlockProtect.GREEN, 1));
}
}
Expand Down
Loading

0 comments on commit 27d8b29

Please sign in to comment.