mirror of
https://github.com/BentoBoxWorld/BSkyBlock.git
synced 2024-11-25 12:15:11 +01:00
Adds support for new death api
https://github.com/BentoBoxWorld/BentoBox/pull/817
This commit is contained in:
parent
326ff24dfd
commit
854b596008
14
pom.xml
14
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bskyblock</artifactId>
|
||||
<version>1.5.3-SNAPSHOT</version>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
|
||||
<name>BSkyBlock</name>
|
||||
<description>BSkyBlock is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland.</description>
|
||||
@ -53,9 +53,13 @@
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
<id>codemc</id>
|
||||
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
@ -91,7 +95,7 @@
|
||||
<dependency>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<version>1.5.3-SNAPSHOT</version>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,11 +1,12 @@
|
||||
package world.bentobox.bskyblock;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.WorldType;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
|
||||
import world.bentobox.bentobox.api.addons.GameModeAddon;
|
||||
import world.bentobox.bentobox.api.configuration.Config;
|
||||
@ -85,6 +86,15 @@ public class BSkyBlock extends GameModeAddon {
|
||||
|
||||
// Create the world if it does not exist
|
||||
islandWorld = getWorld(worldName, World.Environment.NORMAL, chunkGenerator);
|
||||
Bukkit.getLogger().info("World spawn limits ambient " + islandWorld.getAmbientSpawnLimit());
|
||||
//islandWorld.setAnimalSpawnLimit(100);
|
||||
//islandWorld.setAmbientSpawnLimit(100);
|
||||
Bukkit.getLogger().info("World spawn limits animal " + islandWorld.getAnimalSpawnLimit());
|
||||
Bukkit.getLogger().info("World spawn limits monster " + islandWorld.getMonsterSpawnLimit());
|
||||
Bukkit.getLogger().info("World spawn limits water " + islandWorld.getWaterAnimalSpawnLimit());
|
||||
//islandWorld.setTicksPerAnimalSpawns(1);
|
||||
Bukkit.getLogger().info("World spawn limits ticks per animal " + islandWorld.getTicksPerAnimalSpawns());
|
||||
Bukkit.getLogger().info("World spawn limits ticks per monster " + islandWorld.getTicksPerMonsterSpawns());
|
||||
|
||||
// Make the nether if it does not exist
|
||||
if (settings.isNetherGenerate()) {
|
||||
@ -123,7 +133,7 @@ public class BSkyBlock extends GameModeAddon {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||
public @Nullable ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||
return chunkGenerator;
|
||||
}
|
||||
|
||||
|
@ -285,6 +285,10 @@ public class Settings implements WorldSettings {
|
||||
@ConfigEntry(path = "island.deaths.team-join-reset")
|
||||
private boolean teamJoinDeathReset = true;
|
||||
|
||||
@ConfigComment("Reset player death count when they start a new island or reset and island")
|
||||
@ConfigEntry(path = "island.deaths.reset-on-new")
|
||||
private boolean deathsResetOnNew = true;
|
||||
|
||||
// ---------------------------------------------
|
||||
/* PROTECTION */
|
||||
|
||||
@ -1120,4 +1124,19 @@ public class Settings implements WorldSettings {
|
||||
{
|
||||
this.adminCommand = adminCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the deathsResetOnNew
|
||||
*/
|
||||
@Override
|
||||
public boolean isDeathsResetOnNew() {
|
||||
return deathsResetOnNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param deathsResetOnNew the deathsResetOnNew to set
|
||||
*/
|
||||
public void setDeathsResetOnNew(boolean deathsResetOnNew) {
|
||||
this.deathsResetOnNew = deathsResetOnNew;
|
||||
}
|
||||
}
|
||||
|
@ -241,6 +241,8 @@ island:
|
||||
max: 10
|
||||
# When a player joins a team, reset their death count
|
||||
team-join-reset: true
|
||||
# Reset player death count when they start a new island or reset and island
|
||||
reset-on-new: false
|
||||
protection:
|
||||
# Geo restrict mobs.
|
||||
# Mobs that exit the island space where they were spawned will be removed.
|
||||
|
Loading…
Reference in New Issue
Block a user