Skip to content

Commit a9bf092

Browse files
authored
Merge pull request #534 from BentoBoxWorld/develop
Version 1.19.0
2 parents 040b55c + b800350 commit a9bf092

File tree

10 files changed

+214
-73
lines changed

10 files changed

+214
-73
lines changed

pom.xml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@
4242

4343
<distributionManagement>
4444
<snapshotRepository>
45-
<id>codemc-snapshots</id>
46-
<url>https://repo.codemc.org/repository/maven-snapshots</url>
45+
<id>bentoboxworld</id>
46+
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
4747
</snapshotRepository>
48-
<repository>
49-
<id>codemc-releases</id>
50-
<url>https://repo.codemc.org/repository/maven-releases</url>
51-
</repository>
5248
</distributionManagement>
5349

5450
<properties>
@@ -58,14 +54,14 @@
5854
<!-- Non-minecraft related dependencies -->
5955
<powermock.version>2.0.9</powermock.version>
6056
<!-- More visible way how to change dependency versions -->
61-
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
62-
<bentobox.version>2.5.0-SNAPSHOT</bentobox.version>
57+
<spigot.version>1.21.3-R0.1-SNAPSHOT</spigot.version>
58+
<bentobox.version>2.7.1-SNAPSHOT</bentobox.version>
6359
<!-- Revision variable removes warning about dynamic version -->
6460
<revision>${build.version}-SNAPSHOT</revision>
6561
<!-- Do not change unless you want different name for local builds. -->
6662
<build.number>-LOCAL</build.number>
6763
<!-- This allows to change between versions. -->
68-
<build.version>1.18.1</build.version>
64+
<build.version>1.19.0</build.version>
6965
<!-- Sonar Cloud -->
7066
<sonar.projectKey>BentoBoxWorld_BSkyBlock</sonar.projectKey>
7167
<sonar.organization>bentobox-world</sonar.organization>
@@ -121,7 +117,7 @@
121117
</repository>
122118
<repository>
123119
<id>codemc</id>
124-
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
120+
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
125121
</repository>
126122
<repository>
127123
<id>codemc-repo</id>

src/main/java/world/bentobox/bskyblock/BSkyBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import org.bukkit.World;
44
import org.bukkit.World.Environment;
5-
import org.bukkit.entity.SpawnCategory;
65
import org.bukkit.WorldCreator;
76
import org.bukkit.WorldType;
7+
import org.bukkit.entity.SpawnCategory;
88
import org.bukkit.event.Listener;
99
import org.bukkit.generator.ChunkGenerator;
1010
import org.eclipse.jdt.annotation.Nullable;

src/main/java/world/bentobox/bskyblock/Settings.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
package world.bentobox.bskyblock;
22

3-
import java.util.*;
3+
import java.util.ArrayList;
4+
import java.util.Collections;
5+
import java.util.HashMap;
6+
import java.util.HashSet;
7+
import java.util.List;
8+
import java.util.Map;
9+
import java.util.Set;
410

511
import org.bukkit.Difficulty;
612
import org.bukkit.GameMode;
713
import org.bukkit.block.Biome;
814
import org.bukkit.entity.EntityType;
915
import org.eclipse.jdt.annotation.NonNull;
1016

11-
import com.google.common.base.Enums;
12-
1317
import world.bentobox.bentobox.BentoBox;
1418
import world.bentobox.bentobox.api.configuration.ConfigComment;
1519
import world.bentobox.bentobox.api.configuration.ConfigEntry;
@@ -155,7 +159,7 @@ public class Settings implements WorldSettings {
155159
private Biome defaultBiome = Biome.PLAINS;
156160
@ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)")
157161
@ConfigEntry(path = "world.default-nether-biome")
158-
private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER").or(Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.BADLANDS));
162+
private Biome defaultNetherBiome = Biome.NETHER_WASTES;
159163
@ConfigComment("The default biome for the end world (this may affect what mobs can spawn)")
160164
@ConfigEntry(path = "world.default-end-biome")
161165
private Biome defaultEndBiome = Biome.THE_END;

src/main/resources/addon.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: BSkyBlock
22
main: world.bentobox.bskyblock.BSkyBlock
33
version: ${version}${build.number}
4-
api-version: 2.3.0
4+
api-version: 2.7.1
55
metrics: true
66
icon: "OAK_SAPLING"
77
repository: "BentoBoxWorld/BSkyBlock"

src/main/resources/config.yml

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ world:
8484
# Maximum number of islands in the world. Set to -1 or 0 for unlimited.
8585
# If the number of islands is greater than this number, it will stop players from creating islands.
8686
max-islands: 0
87+
# The number of concurrent islands a player can have in the world
88+
# A value of 0 will use the BentoBox config.yml default
89+
concurrent-islands: 1
90+
# Disallow players to have other islands if they are in a team.
91+
disallow-team-member-islands: true
8792
# The default game mode for this world. Players will be set to this mode when they create
8893
# a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR
8994
default-game-mode: SURVIVAL
@@ -147,9 +152,12 @@ world:
147152
OBSIDIAN_SCOOPING: true
148153
ISLAND_RESPAWN: true
149154
CREEPER_GRIEFING: false
155+
WORLD_BLOCK_EXPLODE_DAMAGE: false
156+
VISITOR_KEEP_INVENTORY: false
150157
PETS_STAY_AT_HOME: true
151158
NATURAL_SPAWNING_OUTSIDE_RANGE: true
152159
LIQUIDS_FLOWING_OUT: false
160+
VISITOR_TRIGGER_RAID: true
153161
REMOVE_MOBS: false
154162
ENDER_CHEST: false
155163
TREES_GROWING_OUTSIDE_RANGE: false
@@ -164,11 +172,13 @@ world:
164172
PREVENT_TELEPORT_WHEN_FALLING: false
165173
WORLD_TNT_DAMAGE: false
166174
ENTER_EXIT_MESSAGES: true
175+
ALLOW_MOVE_BOX: true
167176
ENDERMAN_DEATH_DROP: true
168177
OFFLINE_REDSTONE: true
169178
REMOVE_END_EXIT_ISLAND: true
170179
OFFLINE_GROWTH: true
171180
ITEM_FRAME_DAMAGE: false
181+
ENTITY_PORTAL_TELEPORT: false
172182
SPAWNER_SPAWN_EGGS: true
173183
# These are the default protection settings for new islands.
174184
# The value is the minimum island rank required allowed to do the action
@@ -181,20 +191,26 @@ world:
181191
# OWNER = 1000
182192
default-island-flags:
183193
HURT_ANIMALS: 500
194+
LOOM: 500
184195
DRAGON_EGG: 500
185196
REDSTONE: 500
186197
BUCKET: 500
187198
LOCK: 0
188199
ENDER_PEARL: 500
200+
BELL_RINGING: 500
189201
DOOR: 500
190202
BREAK_HOPPERS: 500
191203
FURNACE: 500
204+
HURT_TAMED_ANIMALS: 500
192205
MINECART: 500
193206
ANVIL: 500
194207
FISH_SCOOPING: 500
208+
TRAPPED_CHEST: 500
195209
END_PORTAL: 500
196210
BREEDING: 500
197211
HURT_VILLAGERS: 500
212+
BOOKSHELF: 500
213+
HARVEST: 500
198214
TURTLE_EGGS: 500
199215
FROST_WALKER: 500
200216
COLLECT_LAVA: 500
@@ -206,90 +222,89 @@ world:
206222
CAKE: 500
207223
NAME_TAG: 500
208224
ARMOR_STAND: 500
225+
CHANGE_SETTINGS: 1000
226+
SIGN_EDITING: 500
209227
TRADING: 0
210228
EGGS: 500
211229
ITEM_DROP: 0
230+
CHEST: 500
212231
NOTE_BLOCK: 0
213232
FLINT_AND_STEEL: 500
214233
NETHER_PORTAL: 500
234+
SCULK_SENSOR: 500
215235
LECTERN: 500
236+
GRINDSTONE: 500
237+
SHULKER_BOX: 500
216238
ITEM_PICKUP: 0
217239
CROP_TRAMPLE: 500
218240
DROPPER: 500
219241
BREWING: 500
242+
MOVE_BOX: 1000
220243
TNT_PRIMING: 500
244+
PARKOUR_CREATIVE: 500
221245
COLLECT_WATER: 500
246+
AXOLOTL_SCOOPING: 500
222247
BUTTON: 500
248+
COMPOSTER: 500
249+
STONECUTTING: 500
223250
FIRE_EXTINGUISH: 500
224251
COMMAND_RANKS: 500
225252
BEACON: 500
253+
ALLAY: 500
226254
TRAPDOOR: 500
227255
EXPERIENCE_BOTTLE_THROWING: 500
228256
PRESSURE_PLATE: 0
229257
HIVE: 500
230258
DYE: 500
231259
PLACE_BLOCKS: 500
232260
ITEM_FRAME: 500
261+
CROP_PLANTING: 500
233262
CRAFTING: 0
234263
ENCHANTING: 0
235264
SHEARING: 500
265+
FLOWER_POT: 500
236266
BOAT: 500
237267
BED: 500
238268
SPAWN_EGGS: 500
239269
MILKING: 0
240270
DISPENSER: 500
271+
SCULK_SHRIEKER: 500
241272
GATE: 0
273+
SMITHING: 500
242274
EXPERIENCE_PICKUP: 500
243275
HOPPER: 500
276+
CANDLES: 500
244277
LEASH: 500
245278
MOUNT_INVENTORY: 500
246279
BREAK_BLOCKS: 500
247280
CHORUS_FRUIT: 500
248281
CONTAINER: 500
249282
POTION_THROWING: 500
250283
JUKEBOX: 500
284+
BARREL: 500
285+
CARTOGRAPHY: 500
286+
COLLECT_POWDERED_SNOW: 500
251287
# These are the default settings for new islands
252288
default-island-settings:
253289
PVP_END: false
254290
PVP_NETHER: false
255291
LEAF_DECAY: true
256-
TNT_DAMAGE: true
257-
MONSTER_SPAWNERS_SPAWN: true
292+
ENDERMAN_TELEPORT: true
258293
ANIMAL_NATURAL_SPAWN: true
259294
MONSTER_NATURAL_SPAWN: true
260-
FIRE_IGNITE: true
295+
SHULKER_TELEPORT: true
261296
FIRE_SPREAD: true
262-
ANIMAL_SPAWNERS_SPAWN: true
263297
FIRE_BURNING: true
264298
PVP_OVERWORLD: false
299+
TNT_DAMAGE: true
300+
MONSTER_SPAWNERS_SPAWN: true
301+
FIRE_IGNITE: true
302+
ANIMAL_SPAWNERS_SPAWN: true
303+
BLOCK_EXPLODE_DAMAGE: true
265304
# These settings/flags are hidden from users
266305
# Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings
267306
# Added since 1.4.1.
268-
hidden-flags:
269-
- CHEST_DAMAGE
270-
- HURT_MONSTERS
271-
- BREAK_SPAWNERS
272-
- DISPENSER
273-
- DRAGON_EGG
274-
- DROPPER
275-
- EXPERIENCE_BOTTLE_THROWING
276-
- HURT_VILLAGERS
277-
- MOUNT_INVENTORY
278-
- NOTE_BLOCK
279-
- TURTLE_EGGS
280-
- PVP_END
281-
- FIRE_BURNING
282-
- FIRE_IGNITE
283-
- FIRE_SPREAD
284-
- PVP_NETHER
285-
- PVP_OVERWORLD
286-
- TNT_DAMAGE
287-
- MONSTER_NATURAL_SPAWN
288-
- MONSTER_SPAWNERS_SPAWN
289-
- ANIMAL_SPAWNERS_SPAWN
290-
- ANIMAL_NATURAL_SPAWN
291-
- LEAF_DECAY
292-
- BREAK_HOPPERS
307+
hidden-flags: []
293308
# Visitor banned commands - Visitors to islands cannot use these commands in this world
294309
visitor-banned-commands:
295310
- spawner

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: BentoBox-BSkyBlock
22
main: world.bentobox.bskyblock.BSkyBlockPladdon
33
version: ${project.version}${build.number}
4-
api-version: "1.19"
4+
api-version: "1.21"
55

66
authors: [tastybento]
77
contributors: ["The BentoBoxWorld Community"]

src/test/java/world/bentobox/bskyblock/BSkyBlockTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import org.bukkit.Bukkit;
3232
import org.bukkit.Server;
33+
import org.bukkit.UnsafeValues;
3334
import org.bukkit.entity.Player;
3435
import org.bukkit.plugin.PluginManager;
3536
import org.junit.After;
@@ -59,6 +60,7 @@
5960
import world.bentobox.bentobox.managers.IslandWorldManager;
6061
import world.bentobox.bentobox.managers.IslandsManager;
6162
import world.bentobox.bskyblock.generators.ChunkGeneratorWorld;
63+
import world.bentobox.bskyblock.mocks.ServerMocks;
6264

6365
/**
6466
* @author tastybento
@@ -101,6 +103,7 @@ public static void beforeClass() throws IllegalAccessException, InvocationTarget
101103

102104
@After
103105
public void tearDown() throws IOException {
106+
ServerMocks.unsetBukkitServer();
104107
User.clearUsers();
105108
Mockito.framework().clearInlineMocks();
106109
deleteAll(new File("database"));
@@ -123,6 +126,7 @@ private void deleteAll(File file) throws IOException {
123126
*/
124127
@Before
125128
public void setUp() throws Exception {
129+
ServerMocks.newServer();
126130
// Set up plugin
127131
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
128132
when(plugin.getLogger()).thenReturn(Logger.getAnonymousLogger());
@@ -160,6 +164,9 @@ public void setUp() throws Exception {
160164
when(Bukkit.getServer()).thenReturn(server);
161165
when(Bukkit.getLogger()).thenReturn(Logger.getAnonymousLogger());
162166
when(Bukkit.getPluginManager()).thenReturn(mock(PluginManager.class));
167+
@SuppressWarnings("deprecation")
168+
UnsafeValues unsafe = mock(UnsafeValues.class);
169+
when(Bukkit.getUnsafe()).thenReturn(unsafe);
163170

164171
// Addon
165172
addon = new BSkyBlock();

src/test/java/world/bentobox/bskyblock/SettingsTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
import org.bukkit.GameMode;
1414
import org.bukkit.block.Biome;
1515
import org.bukkit.entity.EntityType;
16+
import org.junit.After;
1617
import org.junit.Before;
1718
import org.junit.Test;
1819

20+
import world.bentobox.bskyblock.mocks.ServerMocks;
21+
1922
/**
2023
* @author tastybento
2124
*
@@ -29,9 +32,15 @@ public class SettingsTest {
2932
*/
3033
@Before
3134
public void setUp() throws Exception {
35+
ServerMocks.newServer();
3236
s = new Settings();
3337
}
3438

39+
@After
40+
public void tearDown() {
41+
ServerMocks.unsetBukkitServer();
42+
}
43+
3544
/**
3645
* Test method for {@link world.bentobox.bskyblock.Settings#setFriendlyName(java.lang.String)}.
3746
*/

0 commit comments

Comments
 (0)