Skip to content

Commit

Permalink
Merge pull request #534 from BentoBoxWorld/develop
Browse files Browse the repository at this point in the history
Version 1.19.0
  • Loading branch information
tastybento authored Nov 17, 2024
2 parents 040b55c + b800350 commit a9bf092
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 73 deletions.
16 changes: 6 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,9 @@

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

<properties>
Expand All @@ -58,14 +54,14 @@
<!-- 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.5.0-SNAPSHOT</bentobox.version>
<spigot.version>1.21.3-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>2.7.1-SNAPSHOT</bentobox.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.18.1</build.version>
<build.version>1.19.0</build.version>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_BSkyBlock</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down Expand Up @@ -121,7 +117,7 @@
</repository>
<repository>
<id>codemc</id>
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
</repository>
<repository>
<id>codemc-repo</id>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/world/bentobox/bskyblock/BSkyBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.entity.SpawnCategory;
import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
import org.bukkit.entity.SpawnCategory;
import org.bukkit.event.Listener;
import org.bukkit.generator.ChunkGenerator;
import org.eclipse.jdt.annotation.Nullable;
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/world/bentobox/bskyblock/Settings.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
package world.bentobox.bskyblock;

import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.bukkit.Difficulty;
import org.bukkit.GameMode;
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;
import org.eclipse.jdt.annotation.NonNull;

import com.google.common.base.Enums;

import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
Expand Down Expand Up @@ -155,7 +159,7 @@ public class Settings implements WorldSettings {
private Biome defaultBiome = Biome.PLAINS;
@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 = Biome.NETHER_WASTES;
@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;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/addon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: BSkyBlock
main: world.bentobox.bskyblock.BSkyBlock
version: ${version}${build.number}
api-version: 2.3.0
api-version: 2.7.1
metrics: true
icon: "OAK_SAPLING"
repository: "BentoBoxWorld/BSkyBlock"
Expand Down
73 changes: 44 additions & 29 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ world:
# Maximum number of islands in the world. Set to -1 or 0 for unlimited.
# If the number of islands is greater than this number, it will stop players from creating islands.
max-islands: 0
# The number of concurrent islands a player can have in the world
# A value of 0 will use the BentoBox config.yml default
concurrent-islands: 1
# Disallow players to have other islands if they are in a team.
disallow-team-member-islands: true
# The default game mode for this world. Players will be set to this mode when they create
# a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR
default-game-mode: SURVIVAL
Expand Down Expand Up @@ -147,9 +152,12 @@ world:
OBSIDIAN_SCOOPING: true
ISLAND_RESPAWN: true
CREEPER_GRIEFING: false
WORLD_BLOCK_EXPLODE_DAMAGE: false
VISITOR_KEEP_INVENTORY: false
PETS_STAY_AT_HOME: true
NATURAL_SPAWNING_OUTSIDE_RANGE: true
LIQUIDS_FLOWING_OUT: false
VISITOR_TRIGGER_RAID: true
REMOVE_MOBS: false
ENDER_CHEST: false
TREES_GROWING_OUTSIDE_RANGE: false
Expand All @@ -164,11 +172,13 @@ world:
PREVENT_TELEPORT_WHEN_FALLING: false
WORLD_TNT_DAMAGE: false
ENTER_EXIT_MESSAGES: true
ALLOW_MOVE_BOX: true
ENDERMAN_DEATH_DROP: true
OFFLINE_REDSTONE: true
REMOVE_END_EXIT_ISLAND: true
OFFLINE_GROWTH: true
ITEM_FRAME_DAMAGE: false
ENTITY_PORTAL_TELEPORT: false
SPAWNER_SPAWN_EGGS: true
# These are the default protection settings for new islands.
# The value is the minimum island rank required allowed to do the action
Expand All @@ -181,20 +191,26 @@ world:
# OWNER = 1000
default-island-flags:
HURT_ANIMALS: 500
LOOM: 500
DRAGON_EGG: 500
REDSTONE: 500
BUCKET: 500
LOCK: 0
ENDER_PEARL: 500
BELL_RINGING: 500
DOOR: 500
BREAK_HOPPERS: 500
FURNACE: 500
HURT_TAMED_ANIMALS: 500
MINECART: 500
ANVIL: 500
FISH_SCOOPING: 500
TRAPPED_CHEST: 500
END_PORTAL: 500
BREEDING: 500
HURT_VILLAGERS: 500
BOOKSHELF: 500
HARVEST: 500
TURTLE_EGGS: 500
FROST_WALKER: 500
COLLECT_LAVA: 500
Expand All @@ -206,90 +222,89 @@ world:
CAKE: 500
NAME_TAG: 500
ARMOR_STAND: 500
CHANGE_SETTINGS: 1000
SIGN_EDITING: 500
TRADING: 0
EGGS: 500
ITEM_DROP: 0
CHEST: 500
NOTE_BLOCK: 0
FLINT_AND_STEEL: 500
NETHER_PORTAL: 500
SCULK_SENSOR: 500
LECTERN: 500
GRINDSTONE: 500
SHULKER_BOX: 500
ITEM_PICKUP: 0
CROP_TRAMPLE: 500
DROPPER: 500
BREWING: 500
MOVE_BOX: 1000
TNT_PRIMING: 500
PARKOUR_CREATIVE: 500
COLLECT_WATER: 500
AXOLOTL_SCOOPING: 500
BUTTON: 500
COMPOSTER: 500
STONECUTTING: 500
FIRE_EXTINGUISH: 500
COMMAND_RANKS: 500
BEACON: 500
ALLAY: 500
TRAPDOOR: 500
EXPERIENCE_BOTTLE_THROWING: 500
PRESSURE_PLATE: 0
HIVE: 500
DYE: 500
PLACE_BLOCKS: 500
ITEM_FRAME: 500
CROP_PLANTING: 500
CRAFTING: 0
ENCHANTING: 0
SHEARING: 500
FLOWER_POT: 500
BOAT: 500
BED: 500
SPAWN_EGGS: 500
MILKING: 0
DISPENSER: 500
SCULK_SHRIEKER: 500
GATE: 0
SMITHING: 500
EXPERIENCE_PICKUP: 500
HOPPER: 500
CANDLES: 500
LEASH: 500
MOUNT_INVENTORY: 500
BREAK_BLOCKS: 500
CHORUS_FRUIT: 500
CONTAINER: 500
POTION_THROWING: 500
JUKEBOX: 500
BARREL: 500
CARTOGRAPHY: 500
COLLECT_POWDERED_SNOW: 500
# These are the default settings for new islands
default-island-settings:
PVP_END: false
PVP_NETHER: false
LEAF_DECAY: true
TNT_DAMAGE: true
MONSTER_SPAWNERS_SPAWN: true
ENDERMAN_TELEPORT: true
ANIMAL_NATURAL_SPAWN: true
MONSTER_NATURAL_SPAWN: true
FIRE_IGNITE: true
SHULKER_TELEPORT: true
FIRE_SPREAD: true
ANIMAL_SPAWNERS_SPAWN: true
FIRE_BURNING: true
PVP_OVERWORLD: false
TNT_DAMAGE: true
MONSTER_SPAWNERS_SPAWN: true
FIRE_IGNITE: true
ANIMAL_SPAWNERS_SPAWN: true
BLOCK_EXPLODE_DAMAGE: true
# These settings/flags are hidden from users
# Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings
# Added since 1.4.1.
hidden-flags:
- CHEST_DAMAGE
- HURT_MONSTERS
- BREAK_SPAWNERS
- DISPENSER
- DRAGON_EGG
- DROPPER
- EXPERIENCE_BOTTLE_THROWING
- HURT_VILLAGERS
- MOUNT_INVENTORY
- NOTE_BLOCK
- TURTLE_EGGS
- PVP_END
- FIRE_BURNING
- FIRE_IGNITE
- FIRE_SPREAD
- PVP_NETHER
- PVP_OVERWORLD
- TNT_DAMAGE
- MONSTER_NATURAL_SPAWN
- MONSTER_SPAWNERS_SPAWN
- ANIMAL_SPAWNERS_SPAWN
- ANIMAL_NATURAL_SPAWN
- LEAF_DECAY
- BREAK_HOPPERS
hidden-flags: []
# Visitor banned commands - Visitors to islands cannot use these commands in this world
visitor-banned-commands:
- spawner
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: BentoBox-BSkyBlock
main: world.bentobox.bskyblock.BSkyBlockPladdon
version: ${project.version}${build.number}
api-version: "1.19"
api-version: "1.21"

authors: [tastybento]
contributors: ["The BentoBoxWorld Community"]
Expand Down
7 changes: 7 additions & 0 deletions src/test/java/world/bentobox/bskyblock/BSkyBlockTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.UnsafeValues;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.junit.After;
Expand Down Expand Up @@ -59,6 +60,7 @@
import world.bentobox.bentobox.managers.IslandWorldManager;
import world.bentobox.bentobox.managers.IslandsManager;
import world.bentobox.bskyblock.generators.ChunkGeneratorWorld;
import world.bentobox.bskyblock.mocks.ServerMocks;

/**
* @author tastybento
Expand Down Expand Up @@ -101,6 +103,7 @@ public static void beforeClass() throws IllegalAccessException, InvocationTarget

@After
public void tearDown() throws IOException {
ServerMocks.unsetBukkitServer();
User.clearUsers();
Mockito.framework().clearInlineMocks();
deleteAll(new File("database"));
Expand All @@ -123,6 +126,7 @@ private void deleteAll(File file) throws IOException {
*/
@Before
public void setUp() throws Exception {
ServerMocks.newServer();
// Set up plugin
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
when(plugin.getLogger()).thenReturn(Logger.getAnonymousLogger());
Expand Down Expand Up @@ -160,6 +164,9 @@ public void setUp() throws Exception {
when(Bukkit.getServer()).thenReturn(server);
when(Bukkit.getLogger()).thenReturn(Logger.getAnonymousLogger());
when(Bukkit.getPluginManager()).thenReturn(mock(PluginManager.class));
@SuppressWarnings("deprecation")
UnsafeValues unsafe = mock(UnsafeValues.class);
when(Bukkit.getUnsafe()).thenReturn(unsafe);

// Addon
addon = new BSkyBlock();
Expand Down
9 changes: 9 additions & 0 deletions src/test/java/world/bentobox/bskyblock/SettingsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
import org.bukkit.GameMode;
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import world.bentobox.bskyblock.mocks.ServerMocks;

/**
* @author tastybento
*
Expand All @@ -29,9 +32,15 @@ public class SettingsTest {
*/
@Before
public void setUp() throws Exception {
ServerMocks.newServer();
s = new Settings();
}

@After
public void tearDown() {
ServerMocks.unsetBukkitServer();
}

/**
* Test method for {@link world.bentobox.bskyblock.Settings#setFriendlyName(java.lang.String)}.
*/
Expand Down
Loading

0 comments on commit a9bf092

Please sign in to comment.