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>
|
<groupId>world.bentobox</groupId>
|
||||||
<artifactId>bskyblock</artifactId>
|
<artifactId>bskyblock</artifactId>
|
||||||
<version>1.5.3-SNAPSHOT</version>
|
<version>1.6.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>BSkyBlock</name>
|
<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>
|
<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>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>codemc-repo</id>
|
<id>codemc</id>
|
||||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>codemc-repo</id>
|
||||||
|
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -91,7 +95,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>world.bentobox</groupId>
|
<groupId>world.bentobox</groupId>
|
||||||
<artifactId>bentobox</artifactId>
|
<artifactId>bentobox</artifactId>
|
||||||
<version>1.5.3-SNAPSHOT</version>
|
<version>1.6.0-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package world.bentobox.bskyblock;
|
package world.bentobox.bskyblock;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.World.Environment;
|
import org.bukkit.World.Environment;
|
||||||
import org.bukkit.WorldCreator;
|
import org.bukkit.WorldCreator;
|
||||||
import org.bukkit.WorldType;
|
import org.bukkit.WorldType;
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
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.addons.GameModeAddon;
|
||||||
import world.bentobox.bentobox.api.configuration.Config;
|
import world.bentobox.bentobox.api.configuration.Config;
|
||||||
@ -85,6 +86,15 @@ public class BSkyBlock extends GameModeAddon {
|
|||||||
|
|
||||||
// Create the world if it does not exist
|
// Create the world if it does not exist
|
||||||
islandWorld = getWorld(worldName, World.Environment.NORMAL, chunkGenerator);
|
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
|
// Make the nether if it does not exist
|
||||||
if (settings.isNetherGenerate()) {
|
if (settings.isNetherGenerate()) {
|
||||||
@ -123,7 +133,7 @@ public class BSkyBlock extends GameModeAddon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NonNull ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
public @Nullable ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||||
return chunkGenerator;
|
return chunkGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +285,10 @@ public class Settings implements WorldSettings {
|
|||||||
@ConfigEntry(path = "island.deaths.team-join-reset")
|
@ConfigEntry(path = "island.deaths.team-join-reset")
|
||||||
private boolean teamJoinDeathReset = true;
|
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 */
|
/* PROTECTION */
|
||||||
|
|
||||||
@ -1120,4 +1124,19 @@ public class Settings implements WorldSettings {
|
|||||||
{
|
{
|
||||||
this.adminCommand = adminCommand;
|
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
|
max: 10
|
||||||
# When a player joins a team, reset their death count
|
# When a player joins a team, reset their death count
|
||||||
team-join-reset: true
|
team-join-reset: true
|
||||||
|
# Reset player death count when they start a new island or reset and island
|
||||||
|
reset-on-new: false
|
||||||
protection:
|
protection:
|
||||||
# Geo restrict mobs.
|
# Geo restrict mobs.
|
||||||
# Mobs that exit the island space where they were spawned will be removed.
|
# Mobs that exit the island space where they were spawned will be removed.
|
||||||
|
Loading…
Reference in New Issue
Block a user