diff --git a/README.md b/README.md
index 9dd3a15b..43313a51 100644
--- a/README.md
+++ b/README.md
@@ -84,14 +84,14 @@ A: It's whatever you want it to be!
## Installation
-0. Install BentoBox and run it on the server at least once to create its data folders.
-1. Place this jar in the addons folder of the BentoBox plugin.
-2. Restart the server.
-3. The addon will create worlds and a data folder and inside the folder will be a config.yml and config files in phases folder.
-4. Stop the server.
-5. Edit config.yml and the .yml config files how you want.
-6. Delete any worlds that were created by default if you made changes that would affect them.
-7. Restart the server.
+1. Install BentoBox and run it on the server at least once to create its data folders.
+2. Place this jar in the addons folder of the BentoBox plugin.
+3. Restart the server.
+4. The addon will create worlds and a data folder and inside the folder will be a config.yml and config files in phases folder.
+5. Stop the server.
+6. Edit config.yml and the .yml config files how you want.
+7. Delete any worlds that were created by default if you made changes that would affect them.
+8. Restart the server.
## Phase config files
diff --git a/pom.xml b/pom.xml
index f0c28a59..0ddbe508 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,9 @@
UTF-821
- 2.0.9
+ 5.10.2
+ 5.11.0
+ v1.21-SNAPSHOT2.7.1-SNAPSHOT4.0.10
@@ -63,7 +65,7 @@
-LOCAL
- 1.21.1
+ 1.22.0BentoBoxWorld_AOneBlockbentobox-world
@@ -183,24 +185,32 @@
provided
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit.version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ ${junit.version}
+ test
+
+
+ org.mockito
+ mockito-junit-jupiter
+ 5.11.0
+ test
+ org.mockitomockito-core
- 3.11.1
- test
-
-
- org.powermock
- powermock-module-junit4
- ${powermock.version}
- test
-
-
- org.powermock
- powermock-api-mockito2
- ${powermock.version}
+ ${mockito.version}test
+
world.bentoboxbentobox
@@ -290,7 +300,7 @@
org.apache.maven.pluginsmaven-surefire-plugin
- 3.0.0-M5
+ 3.5.4
--add-opens java.base/java.lang=ALL-UNNAMED
diff --git a/src/main/java/world/bentobox/aoneblock/AOneBlock.java b/src/main/java/world/bentobox/aoneblock/AOneBlock.java
index 3ea3ba7b..a92de61b 100644
--- a/src/main/java/world/bentobox/aoneblock/AOneBlock.java
+++ b/src/main/java/world/bentobox/aoneblock/AOneBlock.java
@@ -19,11 +19,11 @@
import world.bentobox.aoneblock.generators.ChunkGeneratorWorld;
import world.bentobox.aoneblock.listeners.BlockListener;
import world.bentobox.aoneblock.listeners.BlockProtect;
+import world.bentobox.aoneblock.listeners.BossBarListener;
import world.bentobox.aoneblock.listeners.HoloListener;
import world.bentobox.aoneblock.listeners.InfoListener;
import world.bentobox.aoneblock.listeners.ItemsAdderListener;
import world.bentobox.aoneblock.listeners.JoinLeaveListener;
-import world.bentobox.aoneblock.listeners.BossBarListener;
import world.bentobox.aoneblock.listeners.NoBlockHandler;
import world.bentobox.aoneblock.listeners.StartSafetyListener;
import world.bentobox.aoneblock.oneblocks.OneBlockCustomBlockCreator;
@@ -79,7 +79,7 @@ public class AOneBlock extends GameModeAddon {
.defaultSetting(false)
.build();
/** The listener for the boss bar */
- private BossBarListener bossBar = new BossBarListener(this);
+ private final BossBarListener bossBar = new BossBarListener(this);
/**
* Flag to enable or disable the OneBlock boss bar.
*/
@@ -130,7 +130,13 @@ public void onLoad() {
// Register protection flag with BentoBox
getPlugin().getFlagsManager().registerFlag(this, START_SAFETY);
// Bossbar
- getPlugin().getFlagsManager().registerFlag(this, this.ONEBLOCK_BOSSBAR);
+ if (getSettings().isBossBar()) {
+ getPlugin().getFlagsManager().registerFlag(this, this.ONEBLOCK_BOSSBAR);
+ }
+ // Actionbar
+ if (getSettings().isActionBar()) {
+ getPlugin().getFlagsManager().registerFlag(this, this.ONEBLOCK_ACTIONBAR);
+ }
// Magic Block protection
getPlugin().getFlagsManager().registerFlag(this, this.MAGIC_BLOCK);
}
@@ -171,7 +177,9 @@ public void onEnable() {
registerListener(new BlockProtect(this));
registerListener(new JoinLeaveListener(this));
registerListener(new InfoListener(this));
- registerListener(bossBar);
+ if (getSettings().isBossBar() && getSettings().isActionBar()) {
+ registerListener(bossBar);
+ }
// Register placeholders
phManager = new AOneBlockPlaceholders(this, getPlugin().getPlaceholdersManager());
diff --git a/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java b/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java
index 7e42a372..cfc7d2a0 100644
--- a/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java
+++ b/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java
@@ -82,7 +82,7 @@ private Optional getUsersIsland(User user) {
.filter(is -> user.getUniqueId().equals(is.getOwner())).toList();
if (ownedIslands.size() == 1) {
// Replace with the owned island
- i = ownedIslands.get(0); // pick one
+ i = ownedIslands.getFirst(); // pick one
}
// Return what we have found
return Optional.ofNullable(i);
diff --git a/src/main/java/world/bentobox/aoneblock/Settings.java b/src/main/java/world/bentobox/aoneblock/Settings.java
index d17cb518..cc14c3f7 100644
--- a/src/main/java/world/bentobox/aoneblock/Settings.java
+++ b/src/main/java/world/bentobox/aoneblock/Settings.java
@@ -37,59 +37,72 @@ public class Settings implements WorldSettings {
/* Commands */
@ConfigComment("Player command. What command users will run to access their island.")
@ConfigComment("To define alias, just separate commands with white space.")
- @ConfigEntry(path = "aoneblock.command.island", since = "1.3.0")
+ @ConfigEntry(path = "aoneblock.command.island") //, since = "1.3.0")
private String playerCommandAliases = "ob oneblock";
@ConfigComment("The admin command.")
@ConfigComment("To define alias, just separate commands with white space.")
- @ConfigEntry(path = "aoneblock.command.admin", since = "1.3.0")
+ @ConfigEntry(path = "aoneblock.command.admin") // , since = "1.3.0")
private String adminCommandAliases = "oba obadmin";
@ConfigComment("The default action for new player command call.")
@ConfigComment("Sub-command of main player command that will be run on first player command call.")
@ConfigComment("By default it is sub-command 'create'.")
- @ConfigEntry(path = "aoneblock.command.new-player-action", since = "1.2.0")
+ @ConfigEntry(path = "aoneblock.command.new-player-action") // , since = "1.2.0")
private String defaultNewPlayerAction = "create";
@ConfigComment("The default action for player command.")
@ConfigComment("Sub-command of main player command that will be run on each player command call.")
@ConfigComment("By default it is sub-command 'go'.")
- @ConfigEntry(path = "aoneblock.command.default-action", since = "1.2.0")
+ @ConfigEntry(path = "aoneblock.command.default-action") // , since = "1.2.0")
private String defaultPlayerAction = "go";
@ConfigComment("The command label that shows current phase progress.")
@ConfigComment("By default it is 'count'.")
- @ConfigEntry(path = "aoneblock.command.count-command", since = "1.10.0")
+ @ConfigEntry(path = "aoneblock.command.count-command") // , since = "1.10.0")
private String countCommand = "count";
@ConfigComment("The command label that opens phases GUI.")
@ConfigComment("By default it is 'phases'.")
- @ConfigEntry(path = "aoneblock.command.phases-command", since = "1.10.0")
+ @ConfigEntry(path = "aoneblock.command.phases-command") // , since = "1.10.0")
private String phasesCommand = "phases";
@ConfigComment("The command label that allows to change island phase.")
@ConfigComment("By default it is 'setCount'.")
- @ConfigEntry(path = "aoneblock.command.set-count-command", since = "1.10.0")
+ @ConfigEntry(path = "aoneblock.command.set-count-command") // , since = "1.10.0")
private String setCountCommand = "setCount";
- @ConfigComment("The command label that toggers the progress bar.")
+ @ConfigComment("Enables the bossbar and its command to show progress.")
+ @ConfigEntry(path = "aoneblock.command.bossbar", since = "1.21.2")
+ private boolean bossBar = true;
+
+ @ConfigComment("The command label that toggles the progress bar.")
@ConfigComment("By default it is 'bossbar'.")
- @ConfigEntry(path = "aoneblock.command.bossbar-command", since = "1.19.0")
+ @ConfigEntry(path = "aoneblock.command.bossbar-command") // , since = "1.19.0")
private String bossBarCommand = "bossbar";
+
+ @ConfigComment("Enables the action bar and its command to show progress.")
+ @ConfigEntry(path = "aoneblock.command.actionbar", since = "1.21.2")
+ private boolean actionBar = true;
+
+ @ConfigComment("The command label that toggles the action bar progress.")
+ @ConfigComment("By default it is 'actionbar'.")
+ @ConfigEntry(path = "aoneblock.command.actionbar-command", since = "1.21.2")
+ private String actionBarCommand = "actionbar";
@ConfigComment("How long a player must wait until they can use the setCount command again. In minutes.")
@ConfigComment("This is the command that is run from the phases panel.")
- @ConfigEntry(path = "aoneblock.command.set-count-cooldown", since = "1.13.0")
+ @ConfigEntry(path = "aoneblock.command.set-count-cooldown") // , since = "1.13.0")
private int setCountCooldown = 5;
@ConfigComment("The command label that allows to check if magic block is present and respawns it if not.")
@ConfigComment("By default it is 'respawnBlock check'.")
- @ConfigEntry(path = "aoneblock.command.respawn-block-command", since = "1.10.0")
+ @ConfigEntry(path = "aoneblock.command.respawn-block-command") // , since = "1.10.0")
private String respawnBlockCommand = "respawnBlock check";
@ConfigComment("Placeholder customization")
@ConfigComment("Symbol for the percentage completed scale bar")
- @ConfigEntry(path = "aoneblock.placeholders.scale-symbol", since = "1.9.0")
+ @ConfigEntry(path = "aoneblock.placeholders.scale-symbol") // , since = "1.9.0")
private String percentCompleteSymbol = "■";
/* WORLD */
@@ -150,21 +163,21 @@ public class Settings implements WorldSettings {
@ConfigComment("Spawn limits. These override the limits set in bukkit.yml")
@ConfigComment("If set to a negative number, the server defaults will be used")
- @ConfigEntry(path = "world.spawn-limits.monsters", since = "1.11.2")
+ @ConfigEntry(path = "world.spawn-limits.monsters") // , since = "1.11.2")
private int spawnLimitMonsters = -1;
- @ConfigEntry(path = "world.spawn-limits.animals", since = "1.11.2")
+ @ConfigEntry(path = "world.spawn-limits.animals") // , since = "1.11.2")
private int spawnLimitAnimals = -1;
- @ConfigEntry(path = "world.spawn-limits.water-animals", since = "1.11.2")
+ @ConfigEntry(path = "world.spawn-limits.water-animals") // , since = "1.11.2")
private int spawnLimitWaterAnimals = -1;
- @ConfigEntry(path = "world.spawn-limits.ambient", since = "1.11.2")
+ @ConfigEntry(path = "world.spawn-limits.ambient") // , since = "1.11.2")
private int spawnLimitAmbient = -1;
@ConfigComment("Setting to 0 will disable animal spawns, but this is not recommended. Minecraft default is 400.")
@ConfigComment("A negative value uses the server default")
- @ConfigEntry(path = "world.spawn-limits.ticks-per-animal-spawns", since = "1.11.2")
+ @ConfigEntry(path = "world.spawn-limits.ticks-per-animal-spawns") // , since = "1.11.2")
private int ticksPerAnimalSpawns = -1;
@ConfigComment("Setting to 0 will disable monster spawns, but this is not recommended. Minecraft default is 400.")
@ConfigComment("A negative value uses the server default")
- @ConfigEntry(path = "world.spawn-limits.ticks-per-monster-spawns", since = "1.11.2")
+ @ConfigEntry(path = "world.spawn-limits.ticks-per-monster-spawns") // , since = "1.11.2")
private int ticksPerMonsterSpawns = -1;
@ConfigComment("Radius of island in blocks. (So distance between islands is twice this)")
@@ -280,7 +293,7 @@ public class Settings implements WorldSettings {
@ConfigComment("Option will simulate vanilla portal mechanics that links portals together")
@ConfigComment("or creates a new portal, if there is not a portal in that dimension.")
@ConfigComment("This option requires `allow-nether=true` in server.properties.")
- @ConfigEntry(path = "world.nether.create-and-link-portals", since = "1.16")
+ @ConfigEntry(path = "world.nether.create-and-link-portals") // , since = "1.16")
private boolean makeNetherPortals = false;
// End
@@ -297,7 +310,7 @@ public class Settings implements WorldSettings {
@ConfigComment("This option indicates if obsidian platform in the end should be generated")
@ConfigComment("when player enters the end world.")
@ConfigComment("This option requires `allow-end=true` in bukkit.yml.")
- @ConfigEntry(path = "world.end.create-obsidian-platform", since = "1.16")
+ @ConfigEntry(path = "world.end.create-obsidian-platform") // , since = "1.16")
private boolean makeEndPortals = false;
@ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /island")
@@ -327,7 +340,7 @@ public class Settings implements WorldSettings {
@ConfigComment("These settings/flags are hidden from users")
@ConfigComment("Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings")
- @ConfigEntry(path = "world.hidden-flags", since = "1.4.1")
+ @ConfigEntry(path = "world.hidden-flags") // , since = "1.4.1")
private List hiddenFlags = new ArrayList<>();
@ConfigComment("Visitor banned commands - Visitors to islands cannot use these commands in this world")
@@ -336,7 +349,7 @@ public class Settings implements WorldSettings {
@ConfigComment("Falling banned commands - players cannot use these commands when falling")
@ConfigComment("if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active")
- @ConfigEntry(path = "world.falling-banned-commands", since = "1.8.0")
+ @ConfigEntry(path = "world.falling-banned-commands") // , since = "1.8.0")
private List fallingBannedCommands = new ArrayList<>();
// ---------------------------------------------
@@ -344,7 +357,7 @@ public class Settings implements WorldSettings {
/* ISLAND */
@ConfigComment("Drop broken blocks on top of magic block")
@ConfigComment("If you want Jobs or other plugins to recognize magic block breaking this must be false")
- @ConfigEntry(path = "island.drop-on-top", since = "1.3.0")
+ @ConfigEntry(path = "island.drop-on-top") // , since = "1.3.0")
private boolean dropOnTop = true;
@ConfigComment("Magic block mob warning")
@@ -365,13 +378,13 @@ public class Settings implements WorldSettings {
@ConfigComment("Default maximum number of coop rank members per island")
@ConfigComment("Players can have the aoneblock.coop.maxsize. permission to be bigger but")
@ConfigComment("permission size cannot be less than the default below. ")
- @ConfigEntry(path = "island.max-coop-size", since = "1.13.0")
+ @ConfigEntry(path = "island.max-coop-size") // , since = "1.13.0")
private int maxCoopSize = 4;
@ConfigComment("Default maximum number of trusted rank members per island")
@ConfigComment("Players can have the aoneblock.trust.maxsize. permission to be bigger but")
@ConfigComment("permission size cannot be less than the default below. ")
- @ConfigEntry(path = "island.max-trusted-size", since = "1.13.0")
+ @ConfigEntry(path = "island.max-trusted-size") // , since = "1.13.0")
private int maxTrustSize = 4;
@ConfigComment("Default maximum number of homes a player can have. Min = 1")
@@ -413,15 +426,15 @@ public class Settings implements WorldSettings {
private boolean onJoinResetInventory = true;
@ConfigComment("Reset health - if true, the player's health will be reset.")
- @ConfigEntry(path = "island.reset.on-join.health", since = "1.8.0")
+ @ConfigEntry(path = "island.reset.on-join.health") // , since = "1.8.0")
private boolean onJoinResetHealth = true;
@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
- @ConfigEntry(path = "island.reset.on-join.hunger", since = "1.8.0")
+ @ConfigEntry(path = "island.reset.on-join.hunger") // , since = "1.8.0")
private boolean onJoinResetHunger = true;
@ConfigComment("Reset experience points - if true, the player's experience will be reset.")
- @ConfigEntry(path = "island.reset.on-join.exp", since = "1.8.0")
+ @ConfigEntry(path = "island.reset.on-join.exp") // , since = "1.8.0")
private boolean onJoinResetXP = true;
@@ -443,15 +456,15 @@ public class Settings implements WorldSettings {
private boolean onLeaveResetInventory = false;
@ConfigComment("Reset health - if true, the player's health will be reset.")
- @ConfigEntry(path = "island.reset.on-leave.health", since = "1.8.0")
+ @ConfigEntry(path = "island.reset.on-leave.health") // , since = "1.8.0")
private boolean onLeaveResetHealth = false;
@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
- @ConfigEntry(path = "island.reset.on-leave.hunger", since = "1.8.0")
+ @ConfigEntry(path = "island.reset.on-leave.hunger") // , since = "1.8.0")
private boolean onLeaveResetHunger = false;
@ConfigComment("Reset experience - if true, the player's experience will be reset.")
- @ConfigEntry(path = "island.reset.on-leave.exp", since = "1.8.0")
+ @ConfigEntry(path = "island.reset.on-leave.exp") // , since = "1.8.0")
private boolean onLeaveResetXP = false;
@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@@ -473,13 +486,13 @@ public class Settings implements WorldSettings {
@ConfigComment(" * Island creation can be resource-intensive, please consider the options below to help mitigate")
@ConfigComment(" the potential issues, especially if you expect a lot of players to connect to your server")
@ConfigComment(" in a limited period of time.")
- @ConfigEntry(path = "island.create-island-on-first-login.enable", since = "1.9.0")
+ @ConfigEntry(path = "island.create-island-on-first-login.enable") // , since = "1.9.0")
private boolean createIslandOnFirstLoginEnabled;
@ConfigComment("Time in seconds after the player logged in, before his island gets created.")
@ConfigComment("If set to 0 or less, the island will be created directly upon the player's login.")
@ConfigComment("It is recommended to keep this value under a minute's time.")
- @ConfigEntry(path = "island.create-island-on-first-login.delay", since = "1.9.0")
+ @ConfigEntry(path = "island.create-island-on-first-login.delay") // , since = "1.9.0")
private int createIslandOnFirstLoginDelay = 5;
@ConfigComment("Toggles whether the island creation should be aborted if the player logged off while the")
@@ -492,19 +505,19 @@ public class Settings implements WorldSettings {
@ConfigComment(" * If the island creation started before the player logged off, it will continue.")
@ConfigComment("If set to false, the player's island will be created even if he went offline in the meantime.")
@ConfigComment("Note this option has no effect if the delay (see the option above) is set to 0 or less.")
- @ConfigEntry(path = "island.create-island-on-first-login.abort-on-logout", since = "1.9.0")
+ @ConfigEntry(path = "island.create-island-on-first-login.abort-on-logout") // , since = "1.9.0")
private boolean createIslandOnFirstLoginAbortOnLogout = true;
@ConfigComment("Toggles whether the player should be teleported automatically to his island when it is created.")
@ConfigComment("If set to false, the player will be told his island is ready but will have to teleport to his island using the command.")
- @ConfigEntry(path = "island.teleport-player-to-island-when-created", since = "1.10.0")
+ @ConfigEntry(path = "island.teleport-player-to-island-when-created") // , since = "1.10.0")
private boolean teleportPlayerToIslandUponIslandCreation = true;
@ConfigComment("Create Nether or End islands if they are missing when a player goes through a portal.")
@ConfigComment("Nether and End islands are usually pasted when a player makes their island, but if they are")
@ConfigComment("missing for some reason, you can switch this on.")
@ConfigComment("Note that bedrock removal glitches can exploit this option.")
- @ConfigEntry(path = "island.create-missing-nether-end-islands", since = "1.10.0")
+ @ConfigEntry(path = "island.create-missing-nether-end-islands") // , since = "1.10.0")
private boolean pasteMissingIslands = false;
// Commands
@@ -518,7 +531,7 @@ public class Settings implements WorldSettings {
@ConfigComment("Here are some examples of valid commands to execute:")
@ConfigComment(" * \"[SUDO] bbox version\"")
@ConfigComment(" * \"obadmin deaths set [player] 0\"")
- @ConfigEntry(path = "island.commands.on-join", since = "1.8.0")
+ @ConfigEntry(path = "island.commands.on-join") // , since = "1.8.0")
private List onJoinCommands = new ArrayList<>();
@ConfigComment("List of commands to run when a player leaves an island, resets his island or gets kicked from it.")
@@ -533,7 +546,7 @@ public class Settings implements WorldSettings {
@ConfigComment(" * 'obadmin deaths set [player] 0'")
@ConfigComment("")
@ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.")
- @ConfigEntry(path = "island.commands.on-leave", since = "1.8.0")
+ @ConfigEntry(path = "island.commands.on-leave") // , since = "1.8.0")
private List onLeaveCommands = new ArrayList<>();
@ConfigComment("List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.")
@@ -548,7 +561,7 @@ public class Settings implements WorldSettings {
@ConfigComment(" * 'obadmin deaths set [player] 0'")
@ConfigComment("")
@ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.")
- @ConfigEntry(path = "island.commands.on-respawn", since = "1.14.0")
+ @ConfigEntry(path = "island.commands.on-respawn") // , since = "1.14.0")
private List onRespawnCommands = new ArrayList<>();
// Sethome
@@ -578,7 +591,7 @@ public class Settings implements WorldSettings {
private boolean teamJoinDeathReset = true;
@ConfigComment("Reset player death count when they start a new island or reset an island")
- @ConfigEntry(path = "island.deaths.reset-on-new-island", since = "1.6.0")
+ @ConfigEntry(path = "island.deaths.reset-on-new-island") // , since = "1.6.0")
private boolean deathsResetOnNewIsland = true;
// ---------------------------------------------
@@ -591,7 +604,7 @@ public class Settings implements WorldSettings {
@ConfigComment("AOneBlock blocked mobs.")
@ConfigComment("List of mobs that should not spawn in AOneBlock.")
- @ConfigEntry(path = "protection.block-mobs", since = "1.2.0")
+ @ConfigEntry(path = "protection.block-mobs") // , since = "1.2.0")
private List mobLimitSettings = new ArrayList<>();
@@ -2252,4 +2265,46 @@ public void setBossBarCommand(String bossBarCommand) {
this.bossBarCommand = bossBarCommand;
}
+ /**
+ * @return the bossBar
+ */
+ public boolean isBossBar() {
+ return bossBar;
+ }
+
+ /**
+ * @param bossBar the bossBar to set
+ */
+ public void setBossBar(boolean bossBar) {
+ this.bossBar = bossBar;
+ }
+
+ /**
+ * @return the actionBar
+ */
+ public boolean isActionBar() {
+ return actionBar;
+ }
+
+ /**
+ * @param actionBar the actionBar to set
+ */
+ public void setActionBar(boolean actionBar) {
+ this.actionBar = actionBar;
+ }
+
+ /**
+ * @return the actionBarCommand
+ */
+ public String getActionBarCommand() {
+ return actionBarCommand;
+ }
+
+ /**
+ * @param actionBarCommand the actionBarCommand to set
+ */
+ public void setActionBarCommand(String actionBarCommand) {
+ this.actionBarCommand = actionBarCommand;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java b/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java
index 8f27cfd4..deb0d061 100644
--- a/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java
+++ b/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java
@@ -40,7 +40,7 @@ public boolean canExecute(User user, String label, List args) {
}
if (args.isEmpty()) return true;
// Check phase
- Optional opPhase = addon.getOneBlockManager().getPhase(args.get(0).toUpperCase());
+ Optional opPhase = addon.getOneBlockManager().getPhase(args.getFirst().toUpperCase());
if (opPhase.isEmpty()) {
user.sendMessage("aoneblock.commands.admin.setchest.unknown-phase");
return false;
diff --git a/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSetCountCommand.java b/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSetCountCommand.java
index 1b93241a..88f3e297 100644
--- a/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSetCountCommand.java
+++ b/src/main/java/world/bentobox/aoneblock/commands/admin/AdminSetCountCommand.java
@@ -45,7 +45,7 @@ public boolean execute(User user, String label, List args) {
// Get target player
UUID targetUUID = getPlayers().getUUID(args.get(0));
if (targetUUID == null) {
- user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
+ user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.getFirst());
return false;
}
// Get their island
diff --git a/src/main/java/world/bentobox/aoneblock/commands/island/IslandActionBarCommand.java b/src/main/java/world/bentobox/aoneblock/commands/island/IslandActionBarCommand.java
index 4ac71d6f..30422de2 100644
--- a/src/main/java/world/bentobox/aoneblock/commands/island/IslandActionBarCommand.java
+++ b/src/main/java/world/bentobox/aoneblock/commands/island/IslandActionBarCommand.java
@@ -3,7 +3,9 @@
import java.util.List;
import world.bentobox.aoneblock.AOneBlock;
+import world.bentobox.aoneblock.listeners.BossBarListener;
import world.bentobox.bentobox.api.commands.CompositeCommand;
+import world.bentobox.bentobox.api.metadata.MetaDataValue;
import world.bentobox.bentobox.api.user.User;
public class IslandActionBarCommand extends CompositeCommand {
@@ -26,12 +28,19 @@ public void setup() {
@Override
public boolean execute(User user, String label, List args) {
- addon.getBossBar().toggleUser(user);
getIslands().getIslandAt(user.getLocation()).ifPresent(i -> {
if (!i.isAllowed(addon.ONEBLOCK_ACTIONBAR)) {
user.sendMessage("aoneblock.actionbar.not-active");
}
});
+ // Toggle state
+ boolean newState = !user.getMetaData(BossBarListener.AONEBLOCK_ACTIONBAR).map(MetaDataValue::asBoolean).orElse(true);
+ user.putMetaData(BossBarListener.AONEBLOCK_ACTIONBAR, new MetaDataValue(newState));
+ if (newState) {
+ user.sendMessage("aoneblock.commands.island.actionbar.status_on");
+ } else {
+ user.sendMessage("aoneblock.commands.island.actionbar.status_off");
+ }
return true;
}
}
diff --git a/src/main/java/world/bentobox/aoneblock/commands/island/IslandRespawnBlockCommand.java b/src/main/java/world/bentobox/aoneblock/commands/island/IslandRespawnBlockCommand.java
index 7937f784..33a3c1a7 100644
--- a/src/main/java/world/bentobox/aoneblock/commands/island/IslandRespawnBlockCommand.java
+++ b/src/main/java/world/bentobox/aoneblock/commands/island/IslandRespawnBlockCommand.java
@@ -1,6 +1,7 @@
package world.bentobox.aoneblock.commands.island;
import java.util.List;
+import java.util.Objects;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -67,14 +68,10 @@ public boolean canExecute(User user, String label, List args)
public boolean execute(User user, String label, List args)
{
Island island = this.getIslands().getIsland(this.getWorld(), user);
-
- if (island == null)
- {
- // Hmm, lost island so fast. Well, no, just idea null-pointer check bypass.
- user.sendMessage("general.errors.no-island");
- }
- else if (Material.BEDROCK.equals(island.getCenter().getBlock().getType()) ||
- Material.AIR.equals(island.getCenter().getBlock().getType()))
+ Objects.requireNonNull(island);
+
+ if (island.getCenter().getBlock().getType() == Material.BEDROCK ||
+ island.getCenter().getBlock().getType() == Material.AIR)
{
// Trigger manual block break event.
Bukkit.getServer().getPluginManager().callEvent(
diff --git a/src/main/java/world/bentobox/aoneblock/commands/island/IslandSetCountCommand.java b/src/main/java/world/bentobox/aoneblock/commands/island/IslandSetCountCommand.java
index d455510d..c96cbf12 100644
--- a/src/main/java/world/bentobox/aoneblock/commands/island/IslandSetCountCommand.java
+++ b/src/main/java/world/bentobox/aoneblock/commands/island/IslandSetCountCommand.java
@@ -67,11 +67,11 @@ public boolean execute(User user, String label, List args) {
}
// Get value
// Get new range
- if (!Util.isInteger(args.get(0), true) || Integer.parseInt(args.get(0)) < 0) {
- user.sendMessage("general.errors.must-be-positive-number", TextVariables.NUMBER, args.get(0));
+ if (!Util.isInteger(args.getFirst(), true) || Integer.parseInt(args.getFirst()) < 0) {
+ user.sendMessage("general.errors.must-be-positive-number", TextVariables.NUMBER, args.getFirst());
return false;
}
- int count = Integer.parseInt(args.get(0));
+ int count = Integer.parseInt(args.getFirst());
// Check the value is lower than played so far
@NonNull
OneBlockIslands i = addon.getBlockListener().getIsland(island);
diff --git a/src/main/java/world/bentobox/aoneblock/commands/island/PlayerCommand.java b/src/main/java/world/bentobox/aoneblock/commands/island/PlayerCommand.java
index f268edcc..a3e5be87 100644
--- a/src/main/java/world/bentobox/aoneblock/commands/island/PlayerCommand.java
+++ b/src/main/java/world/bentobox/aoneblock/commands/island/PlayerCommand.java
@@ -21,22 +21,31 @@ public void setup() {
// Count
new IslandCountCommand(this,
- settings.getCountCommand().split(" ")[0],
- settings.getCountCommand().split(" "));
+ settings.getCountCommand().split(" ")[0],
+ settings.getCountCommand().split(" "));
// Phase list
new IslandPhasesCommand(this,
- settings.getPhasesCommand().split(" ")[0],
- settings.getPhasesCommand().split(" "));
+ settings.getPhasesCommand().split(" ")[0],
+ settings.getPhasesCommand().split(" "));
// Set Count
new IslandSetCountCommand(this,
- settings.getSetCountCommand().split(" ")[0],
- settings.getSetCountCommand().split(" "));
+ settings.getSetCountCommand().split(" ")[0],
+ settings.getSetCountCommand().split(" "));
// Force block respawn
new IslandRespawnBlockCommand(this,
- settings.getRespawnBlockCommand().split(" ")[0],
- settings.getRespawnBlockCommand().split(" "));
+ settings.getRespawnBlockCommand().split(" ")[0],
+ settings.getRespawnBlockCommand().split(" "));
+
+ // Action bar
+ if (settings.isActionBar()) {
+ new IslandActionBarCommand(this, settings.getActionBarCommand().split(" ")[0],
+ settings.getActionBarCommand().split(" "));
+ }
+
// Boss bar
- new IslandBossBarCommand(this, settings.getBossBarCommand().split(" ")[0],
- settings.getBossBarCommand().split(" "));
+ if (settings.isBossBar()) {
+ new IslandBossBarCommand(this, settings.getBossBarCommand().split(" ")[0],
+ settings.getBossBarCommand().split(" "));
+ }
}
}
diff --git a/src/main/java/world/bentobox/aoneblock/listeners/BlockListener.java b/src/main/java/world/bentobox/aoneblock/listeners/BlockListener.java
index 7cdeed88..ee2efe42 100644
--- a/src/main/java/world/bentobox/aoneblock/listeners/BlockListener.java
+++ b/src/main/java/world/bentobox/aoneblock/listeners/BlockListener.java
@@ -716,7 +716,7 @@ public void onPlayerInteract(PlayerInteractEvent e) {
return;
}
- if (block != null && block.getBlockData() instanceof Brushable bb) {
+ if (block.getBlockData() instanceof Brushable bb) {
int dusted = bb.getDusted() + 1;
if (dusted > bb.getMaximumDusted()) {
/// === Brushing is FINISHED! ===
diff --git a/src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java b/src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java
index 822f3771..d3c1474c 100644
--- a/src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java
+++ b/src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java
@@ -18,7 +18,6 @@
import org.eclipse.jdt.annotation.NonNull;
import net.kyori.adventure.text.Component;
-import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import world.bentobox.aoneblock.AOneBlock;
import world.bentobox.aoneblock.dataobjects.OneBlockIslands;
@@ -33,7 +32,7 @@
public class BossBarListener implements Listener {
private static final String AONEBLOCK_BOSSBAR = "aoneblock.bossbar";
- private static final String AONEBLOCK_ACTIONBAR = "aoneblock.actionbar";
+ public static final String AONEBLOCK_ACTIONBAR = "aoneblock.actionbar";
private static final LegacyComponentSerializer LEGACY_SERIALIZER = LegacyComponentSerializer.builder()
.character('&')
@@ -45,7 +44,7 @@ public BossBarListener(AOneBlock addon) {
this.addon = addon;
}
- private AOneBlock addon;
+ private final AOneBlock addon;
// Store a boss bar for each player (using their UUID)
private final Map islandBossBars = new HashMap<>();
@@ -98,11 +97,9 @@ private void tryToShowActionBar(UUID uuid, Island island) {
if (!island.isAllowed(addon.ONEBLOCK_ACTIONBAR)) {
return;
}
- // Default to showing boss bar unless it is explicitly turned off
+ // Default to showing action bar unless it is explicitly turned off
if (!user.getMetaData(AONEBLOCK_ACTIONBAR).map(MetaDataValue::asBoolean).orElse(true)) {
- // Remove any boss bar from user if they are in the world
- removeBar(user, island);
- // Do not show a boss bar
+ // Do not show an action bar
return;
}
// Get the progress
@@ -221,7 +218,7 @@ public void onJoin(PlayerJoinEvent e) {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onQuit(PlayerQuitEvent e) {
// Clean up boss bars
- islandBossBars.values().stream().forEach(bb -> bb.removePlayer(e.getPlayer()));
+ islandBossBars.values().forEach(bb -> bb.removePlayer(e.getPlayer()));
islandBossBars.values().removeIf(bb -> bb.getPlayers().isEmpty());
}
diff --git a/src/main/java/world/bentobox/aoneblock/listeners/ItemsAdderListener.java b/src/main/java/world/bentobox/aoneblock/listeners/ItemsAdderListener.java
index bf4c25bb..ec97f0e2 100644
--- a/src/main/java/world/bentobox/aoneblock/listeners/ItemsAdderListener.java
+++ b/src/main/java/world/bentobox/aoneblock/listeners/ItemsAdderListener.java
@@ -7,7 +7,7 @@
import world.bentobox.aoneblock.AOneBlock;
/**
- * Handles ItemsAdderLoadDataEvent which fired when ItemsAdder loaded it's data or reload it's data
+ * Handles ItemsAdderLoadDataEvent which fired when ItemsAdder loaded its data or reload its data
*
* @author Teenkung123
*/
diff --git a/src/main/java/world/bentobox/aoneblock/oneblocks/OneBlocksManager.java b/src/main/java/world/bentobox/aoneblock/oneblocks/OneBlocksManager.java
index 0a6d23b8..7f52544d 100644
--- a/src/main/java/world/bentobox/aoneblock/oneblocks/OneBlocksManager.java
+++ b/src/main/java/world/bentobox/aoneblock/oneblocks/OneBlocksManager.java
@@ -572,7 +572,7 @@ public NavigableMap getBlockProbs() {
}
/**
- * Get phase by name. Name should have any spaces converted to underscores. Case
+ * Get phase by name. Name should have any spaces converted to underscores. Case-
* insensitive.
*
* @param name - name to search
@@ -859,7 +859,7 @@ public void getProbs(OneBlockPhase phase) {
}
/**
- * Get all the probs for each phases and log to console
+ * Get all the probs for each phase and log to console
*/
public void getAllProbs() {
blockProbs.values().forEach(this::getProbs);
diff --git a/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java b/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java
index d2acc5d5..b1268493 100644
--- a/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java
+++ b/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java
@@ -27,7 +27,6 @@
import world.bentobox.aoneblock.oneblocks.OneBlockPhase;
import world.bentobox.aoneblock.oneblocks.Requirement;
import world.bentobox.bank.Bank;
-import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.panels.PanelItem;
@@ -429,7 +428,7 @@ private PanelItem createPhaseButton(ItemTemplateRecord template, Map.Entry= 0) {
// Append color code
result.append(ChatColor.COLOR_CHAR);
diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml
index fc1623ad..7eeb0e7c 100755
--- a/src/main/resources/addon.yml
+++ b/src/main/resources/addon.yml
@@ -50,9 +50,12 @@ permissions:
aoneblock.island:
description: Allow use of '/ob' command - the main island command
default: TRUE
+ aoneblock.island.actionbar:
+ description: Allow use of '/ob actionbar' command - toggle the actionbar
+ default: TRUE
aoneblock.island.bossbar:
- description: Allow use of '/ob bossbar' command - toggle the bossbar
- default: FALSE
+ description: Allow use of '/ob bossbar' command - toggle the bossbar
+ default: TRUE
aoneblock.island.home:
description: Allow use of '/ob go' command - teleport you to your island
default: TRUE
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index a5f60bbb..5708bea7 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -3,46 +3,49 @@ aoneblock:
command:
# Player command. What command users will run to access their island.
# To define alias, just separate commands with white space.
- # Added since 1.3.0.
island: ob oneblock
# The admin command.
# To define alias, just separate commands with white space.
- # Added since 1.3.0.
admin: obadmin oneblockadmin oba
# The default action for new player command call.
# Sub-command of main player command that will be run on first player command call.
- # By default it is sub-command 'create'.
- # Added since 1.2.0.
+ # By default, it is sub-command 'create'.
new-player-action: create
# The default action for player command.
# Sub-command of main player command that will be run on each player command call.
- # By default it is sub-command 'go'.
- # Added since 1.2.0.
+ # By default, it is sub-command 'go'.
default-action: go
# The command label that shows current phase progress.
- # By default it is 'count'.
- # Added since 1.10.0.
+ # By default, it is 'count'.
count-command: count
# The command label that opens phases GUI.
- # By default it is 'phases'.
- # Added since 1.10.0.
+ # By default, it is 'phases'.
phases-command: phases
# The command label that allows to change island phase.
- # By default it is 'setCount'.
- # Added since 1.10.0.
+ # By default, it is 'setCount'.
set-count-command: setCount
+ # Enables the bossbar and its command to show progress.
+ # Added since 1.21.2.
+ bossbar: true
+ # The command label that toggles the progress bar.
+ # By default, it is 'bossbar'.
+ bossbar-command: bossbar
+ # Enables the action bar and its command to show progress.
+ # Added since 1.21.2.
+ actionbar: true
+ # The command label that toggles the action bar progress.
+ # By default, it is 'actionbar'.
+ # Added since 1.21.2.
+ actionbar-command: actionbar
# How long a player must wait until they can use the setCount command again. In minutes.
# This is the command that is run from the phases panel.
- # Added since 1.13.0.
set-count-cooldown: 5
# The command label that allows to check if magic block is present and respawns it if not.
- # By default it is 'respawnBlock check'.
- # Added since 1.10.0.
+ # By default, it is 'respawnBlock check'.
respawn-block-command: respawnBlock check
placeholders:
# Placeholder customization
# Symbol for the percentage completed scale bar
- # Added since 1.9.0.
scale-symbol: ■
world:
# Friendly name for this world. Used in admin commands. Must be a single word
@@ -70,7 +73,7 @@ world:
click-type: LEFT
# Size of particles. Default is 0.5. Must be greater than 0.
particle-size: 0.5
- # Density of particles - Value from 0.1 to 1. Default is 0.65. Smaller values are more dense, higher are less.
+ # Density of particles - Value from 0.1 to 1. Default is 0.65. Smaller values are denser, higher are less.
particle-density: 0.65
# Color of particles
particle-color:
@@ -86,21 +89,15 @@ world:
spawn-limits:
# Spawn limits. These override the limits set in bukkit.yml
# If set to a negative number, the server defaults will be used
- # Added since 1.11.2.
monsters: -1
- # Added since 1.11.2.
animals: -1
- # Added since 1.11.2.
water-animals: -1
- # Added since 1.11.2.
ambient: -1
# Setting to 0 will disable animal spawns, but this is not recommended. Minecraft default is 400.
# A negative value uses the server default
- # Added since 1.11.2.
ticks-per-animal-spawns: -1
# Setting to 0 will disable monster spawns, but this is not recommended. Minecraft default is 400.
# A negative value uses the server default
- # Added since 1.11.2.
ticks-per-monster-spawns: -1
# Radius of island in blocks. (So distance between islands is twice this)
# It is the same for every dimension : Overworld, Nether and End.
@@ -125,6 +122,9 @@ world:
# Island height - Lowest is 5.
# It is the y coordinate of the bedrock block in the schem.
island-height: 80
+ # 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 team members from having their own islands.
disallow-team-member-islands: true
# Use your own world generator for this world.
@@ -132,7 +132,7 @@ world:
# If used, you must specify the world name and generator in the bukkit.yml file.
# See https://bukkit.gamepedia.com/Bukkit.yml#.2AOPTIONAL.2A_worlds
use-own-generator: false
- # Sea height (don't changes this mid-game unless you delete the world)
+ # Sea height (don't change this mid-game unless you delete the world)
# Minimum is 0
# If sea height is less than about 10, then players will drop right through it
# if it exists.
@@ -145,11 +145,11 @@ world:
# a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR
default-game-mode: SURVIVAL
# The default biome for the overworld
- default-biome: PLAINS
+ default-biome: plains
# The default biome for the nether world (this may affect what mobs can spawn)
- default-nether-biome: NETHER_WASTES
+ default-nether-biome: nether_wastes
# The default biome for the end world (this may affect what mobs can spawn)
- default-end-biome: THE_END
+ default-end-biome: the_end
# The maximum number of players a player can ban at any one time in this game mode.
# The permission acidisland.ban.maxlimit.X where X is a number can also be used per player
# -1 = unlimited
@@ -159,7 +159,7 @@ world:
# the nether will not occur. Other plugins may still enable portal usage.
# Note: Some default challenges will not be possible if there is no nether.
# Note that with a standard nether all players arrive at the same portal and entering a
- # portal will return them back to their islands.
+ # portal will return them to their islands.
generate: true
# Islands in Nether. Change to false for standard vanilla nether.
# Note that there is currently no magic block in the Nether
@@ -178,7 +178,6 @@ world:
# Option will simulate vanilla portal mechanics that links portals together
# or creates a new portal, if there is not a portal in that dimension.
# This option requires `allow-nether=true` in server.properties.
- # Added since 1.16.
create-and-link-portals: false
end:
# End Nether - if this is false, the end world will not be made and access to
@@ -191,13 +190,12 @@ world:
# This option indicates if obsidian platform in the end should be generated
# when player enters the end world.
# This option requires `allow-end=true` in bukkit.yml.
- # Added since 1.16.
create-obsidian-platform: false
# Mob white list - these mobs will NOT be removed when logging in or doing /island
remove-mobs-whitelist:
- - ENDERMAN
- - ZOMBIE_VILLAGER
- - WITHER
+ - enderman
+ - wither
+ - zombie_villager
# World flags. These are boolean settings for various flags for this world
flags:
CREEPER_DAMAGE: true
@@ -228,7 +226,7 @@ world:
ITEM_FRAME_DAMAGE: 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
+ # The value is the minimum island rank required to do the action
# Ranks are the following:
# VISITOR = 0
# COOP = 200
@@ -244,9 +242,11 @@ world:
BUCKET: 500
LOCK: 0
ENDER_PEARL: 500
+ BELL_RINGING: 500
DOOR: 500
BREAK_HOPPERS: 500
FURNACE: 500
+ HURT_TAMED_ANIMALS: 500
ANVIL: 500
MINECART: 500
FISH_SCOOPING: 500
@@ -296,6 +296,7 @@ world:
COMMAND_RANKS: 500
BEACON: 500
ALLAY: 500
+ CRAFTER: 500
TRAPDOOR: 500
PRESSURE_PLATE: 0
EXPERIENCE_BOTTLE_THROWING: 500
@@ -318,11 +319,13 @@ world:
SMITHING: 500
EXPERIENCE_PICKUP: 500
HOPPER: 500
+ CANDLES: 500
LEASH: 500
MOUNT_INVENTORY: 500
BREAK_BLOCKS: 500
CHORUS_FRUIT: 500
CONTAINER: 500
+ MAGIC_BLOCK: 200
JUKEBOX: 500
POTION_THROWING: 500
BARREL: 500
@@ -339,15 +342,16 @@ world:
SHULKER_TELEPORT: true
FIRE_SPREAD: true
FIRE_BURNING: true
+ COMMAND_RANKS: true
PVP_OVERWORLD: false
TNT_DAMAGE: true
MONSTER_SPAWNERS_SPAWN: true
FIRE_IGNITE: true
+ ONEBLOCK_BOSSBAR: true
BLOCK_EXPLODE_DAMAGE: true
ANIMAL_SPAWNERS_SPAWN: 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: []
# Visitor banned commands - Visitors to islands cannot use these commands in this world
visitor-banned-commands:
@@ -355,14 +359,12 @@ world:
- spawnmob
# Falling banned commands - players cannot use these commands when falling
# if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active
- # Added since 1.8.0.
falling-banned-commands:
- warp
- spawn
island:
# Drop broken blocks on top of magic block
# If you want Jobs or other plugins to recognize magic block breaking this must be false
- # Added since 1.3.0.
drop-on-top: true
# Magic block mob warning
# Players might be able to hear hostile mobs up to this many blocks away
@@ -376,12 +378,10 @@ island:
# Default maximum number of coop rank members per island
# Players can have the aoneblock.coop.maxsize. permission to be bigger but
# permission size cannot be less than the default below.
- # Added since 1.13.0.
max-coop-size: 4
# Default maximum number of trusted rank members per island
# Players can have the aoneblock.trust.maxsize. permission to be bigger but
# permission size cannot be less than the default below.
- # Added since 1.13.0.
max-trusted-size: 4
# Default maximum number of homes a player can have. Min = 1
# Accessed via /is sethome or /is go
@@ -411,13 +411,10 @@ island:
# plugin may still reset the inventory when the world changes.
inventory: false
# Reset health - if true, the player's health will be reset.
- # Added since 1.8.0.
health: false
# Reset hunger - if true, the player's hunger will be reset.
- # Added since 1.8.0.
hunger: false
# Reset experience points - if true, the player's experience will be reset.
- # Added since 1.8.0.
exp: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false
@@ -432,13 +429,10 @@ island:
# plugin may still reset the inventory when the world changes.
inventory: true
# Reset health - if true, the player's health will be reset.
- # Added since 1.8.0.
health: false
# Reset hunger - if true, the player's hunger will be reset.
- # Added since 1.8.0.
hunger: false
# Reset experience - if true, the player's experience will be reset.
- # Added since 1.8.0.
exp: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false
@@ -454,16 +448,14 @@ island:
# Warning:
# * If you are running multiple gamemodes on your server, and all of them have
# this feature enabled, an island in all the gamemodes will be created simultaneously.
- # However, it is impossible to know on which island the player will be teleported to afterwards.
+ # However, it is impossible to know on which island the player will be teleported to afterward.
# * Island creation can be resource-intensive, please consider the options below to help mitigate
# the potential issues, especially if you expect a lot of players to connect to your server
# in a limited period of time.
- # Added since 1.9.0.
enable: false
# Time in seconds after the player logged in, before his island gets created.
# If set to 0 or less, the island will be created directly upon the player's login.
# It is recommended to keep this value under a minute's time.
- # Added since 1.9.0.
delay: 5
# Toggles whether the island creation should be aborted if the player logged off while the
# delay (see the option above) has not worn off yet.
@@ -475,17 +467,14 @@ island:
# * If the island creation started before the player logged off, it will continue.
# If set to false, the player's island will be created even if he went offline in the meantime.
# Note this option has no effect if the delay (see the option above) is set to 0 or less.
- # Added since 1.9.0.
abort-on-logout: true
# Toggles whether the player should be teleported automatically to his island when it is created.
# If set to false, the player will be told his island is ready but will have to teleport to his island using the command.
- # Added since 1.10.0.
teleport-player-to-island-when-created: true
# Create Nether or End islands if they are missing when a player goes through a portal.
# Nether and End islands are usually pasted when a player makes their island, but if they are
# missing for some reason, you can switch this on.
# Note that bedrock removal glitches can exploit this option.
- # Added since 1.10.0.
create-missing-nether-end-islands: false
commands:
# List of commands to run when a player joins an island or creates one.
@@ -498,7 +487,6 @@ island:
# Here are some examples of valid commands to execute:
# * "[SUDO] bbox version"
# * "obadmin deaths set [player] 0"
- # Added since 1.8.0.
on-join: []
# List of commands to run when a player leaves an island, resets his island or gets kicked from it.
# These commands are run by the console, unless otherwise stated using the [SUDO] prefix,
@@ -512,7 +500,6 @@ island:
# * 'obadmin deaths set [player] 0'
#
# Note that player-executed commands might not work, as these commands can be run with said player being offline.
- # Added since 1.8.0.
on-leave: []
# List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.
# These commands are run by the console, unless otherwise stated using the [SUDO] prefix,
@@ -526,7 +513,6 @@ island:
# * 'obadmin deaths set [player] 0'
#
# Note that player-executed commands might not work, as these commands can be run with said player being offline.
- # Added since 1.14.0.
on-respawn: []
sethome:
nether:
@@ -543,7 +529,6 @@ island:
# 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 an island
- # Added since 1.6.0.
reset-on-new-island: true
protection:
# Geo restrict mobs.
@@ -554,7 +539,6 @@ protection:
- BLAZE
# AOneBlock blocked mobs.
# List of mobs that should not spawn in AOneBlock.
- # Added since 1.2.0.
block-mobs: []
# Invincible visitors. List of damages that will not affect visitors.
# Make list blank if visitors should receive all damages
diff --git a/src/main/resources/locales/cs.yml b/src/main/resources/locales/cs.yml
index 44b2ff60..3b3f1dec 100644
--- a/src/main/resources/locales/cs.yml
+++ b/src/main/resources/locales/cs.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Ochrana Kouzelného Bloku
+ description: |-
+ &b Hodnost, která může rozbít
+ &b kouzelný blok, pokud
+ &b dokáže rozbíjet bloky.
+ hint: "&c Vaše hodnost nemůže rozbít kouzelný blok!"
START_SAFETY:
- name: Počáteční bezpečnost
- description: |
- &b Zabraňuje novým hráčům
- &b from moving for 1 minute
- &b takže nespadnou.
- hint: '&c pohyb zablokován pro bezpečnost po [number] více sekund!'
- free-to-move: '&a Můžete se volně pohybovat. '
+ name: Počáteční Bezpečnost
+ description: |-
+ &b Zabrání novým hráčům
+ &b v pohybu po dobu 1 minuty,
+ &b aby nespadli.
+ hint: "&c Pohyb zablokován kvůli bezpečnosti na [number] sekund!"
+ free-to-move: "&a Můžete se volně pohybovat. Buďte opatrní!"
ONEBLOCK_BOSSBAR:
- name: Boss Bar
- description: |
- &b Ukazuje stavový řádek
- &b pro každou fázi.
+ name: Boss Bar
+ description: |-
+ &b Zobrazuje stavový panel
+ &b pro každou fázi.
+ ONEBLOCK_ACTIONBAR:
+ name: Action Bar
+ description: |-
+ &b Zobrazuje stav
+ &b pro každou fázi
+ &b v Action Baru.
aoneblock:
bossbar:
title: Bloky zbývající
diff --git a/src/main/resources/locales/de.yml b/src/main/resources/locales/de.yml
index 4801f7a2..574391c0 100644
--- a/src/main/resources/locales/de.yml
+++ b/src/main/resources/locales/de.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Schutz des Magischen Blocks
+ description: |-
+ &b Rang, der den magischen
+ &b Block zerstören kann, falls
+ &b Blöcke zerstört werden können.
+ hint: "&c Dein Rang kann den magischen Block nicht zerstören!"
START_SAFETY:
- name: Sicherheit beginnen
- description: |
- &b verhindert neue Spieler
- &b vor dem Umzug für 1 Minute
- &b damit sie nicht abfallen.
- hint: '&c Bewegung für die Sicherheit für [number] mehr Sekunden!'
- free-to-move: '&a Sie können sich frei bewegen. '
+ name: Start-Sicherheit
+ description: |-
+ &b Verhindert, dass neue Spieler
+ &b sich 1 Minute lang bewegen,
+ &b damit sie nicht herunterfallen.
+ hint: "&c Bewegung aus Sicherheitsgründen für [number] weitere Sekunden blockiert!"
+ free-to-move: "&a Du kannst dich frei bewegen. Sei vorsichtig!"
ONEBLOCK_BOSSBAR:
- name: Boss Bar
- description: |
- &b Zeigt eine Statusleiste
- &b für jede Phase.
+ name: Boss-Balken
+ description: |-
+ &b Zeigt eine Statusleiste
+ &b für jede Phase.
+ ONEBLOCK_ACTIONBAR:
+ name: Action-Leiste
+ description: |-
+ &b Zeigt einen Status
+ &b für jede Phase
+ &b in der Action-Leiste.
aoneblock:
bossbar:
title: Verbleibende Blöcke
diff --git a/src/main/resources/locales/en-US.yml b/src/main/resources/locales/en-US.yml
index 19a340e1..492723ec 100755
--- a/src/main/resources/locales/en-US.yml
+++ b/src/main/resources/locales/en-US.yml
@@ -7,13 +7,13 @@ protection:
flags:
MAGIC_BLOCK:
name: Magic Block Protection
- description: |
+ description: |-
&b Rank that can break the magic
&b block if they can break blocks.
hint: "&c Your rank cannot break the magic block!"
START_SAFETY:
name: Starting Safety
- description: |
+ description: |-
&b Prevents new players
&b from moving for 1 minute
&b so they don't fall off.
@@ -21,13 +21,12 @@ protection:
free-to-move: "&a You are free to move. Be careful!"
ONEBLOCK_BOSSBAR:
name: Boss Bar
- description: |
+ description: |-
&b Shows a status bar
&b for each phase.
-
ONEBLOCK_ACTIONBAR:
name: Action Bar
- description: |
+ description: |-
&b Shows a status
&b for each phase
&b in the Action Bar.
@@ -109,12 +108,12 @@ aoneblock:
# This section contains all button names and lore (description)
buttons:
# List of buttons in GUI's
- # Button that is used in multi-page GUIs which allows to return to previous page.
+ # Button that is used in multipage GUIs which allows to return to previous page.
previous:
name: "&f&l Previous Page"
description: |-
&7 Switch to [number] page
- # Button that is used in multi-page GUIs which allows to go to next page.
+ # Button that is used in multipage GUIs which allows to go to next page.
next:
name: "&f&l Next Page"
description: |-
diff --git a/src/main/resources/locales/es.yml b/src/main/resources/locales/es.yml
index 45f9ce6a..3cf8af86 100644
--- a/src/main/resources/locales/es.yml
+++ b/src/main/resources/locales/es.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Protección de Bloque Mágico
+ description: |-
+ &b Rango que puede romper el
+ &b bloque mágico si puede
+ &b romper bloques.
+ hint: "&c ¡Tu rango no puede romper el bloque mágico!"
START_SAFETY:
- name: Seguridad inicial
- description: |
- &b Previene nuevos jugadores
- &b de moverse por 1 minuto
- &b Entonces no se caen.
- hint: '&c ¡Movimiento bloqueado por seguridad por [number] más segundos!'
- free-to-move: '&c Eres libre de moverte. '
+ name: Seguridad Inicial
+ description: |-
+ &b Evita que los nuevos jugadores
+ &b se muevan durante 1 minuto
+ &b para que no se caigan.
+ hint: "&c Movimiento bloqueado por seguridad durante [number] segundos más!"
+ free-to-move: "&a Eres libre de moverte. ¡Ten cuidado!"
ONEBLOCK_BOSSBAR:
- name: Bar del jefe
- description: |
- &b Muestra una barra de estado
- &b para cada fase.
+ name: Barra de Jefe (Boss Bar)
+ description: |-
+ &b Muestra una barra de estado
+ &b para cada fase.
+ ONEBLOCK_ACTIONBAR:
+ name: Barra de Acción (Action Bar)
+ description: |-
+ &b Muestra un estado
+ &b para cada fase
+ &b en la Barra de Acción.
aoneblock:
bossbar:
title: Bloques restantes
diff --git a/src/main/resources/locales/fr.yml b/src/main/resources/locales/fr.yml
index 7492bcde..09e96625 100644
--- a/src/main/resources/locales/fr.yml
+++ b/src/main/resources/locales/fr.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Protection du Bloc Magique
+ description: |-
+ &b Rang qui peut casser le bloc
+ &b magique s'il peut casser
+ &b des blocs.
+ hint: "&c Votre rang ne peut pas casser le bloc magique!"
START_SAFETY:
- name: Sécurité de démarrage
- description: |
+ name: Sécurité de Départ
+ description: |-
&b Empêche les nouveaux joueurs
- &b de déménager pendant 1 minute
- &b Alors ils ne tombent pas.
- hint: '&c Mouvement bloqué pour la sécurité pendant [number] plus de secondes!'
- free-to-move: '&a Vous êtes libre de bouger. '
+ &b de bouger pendant 1 minute
+ &b pour qu'ils ne tombent pas.
+ hint: "&c Mouvement bloqué par sécurité pendant [number] secondes supplémentaires!"
+ free-to-move: "&a Vous êtes libre de bouger. Faites attention!"
ONEBLOCK_BOSSBAR:
- name: Barre de boss
- description: |
- &b Affiche une barre d'état
- pour chaque phase.
+ name: Barre de Boss
+ description: |-
+ &b Affiche une barre de statut
+ &b pour chaque phase.
+ ONEBLOCK_ACTIONBAR:
+ name: Barre d'Action
+ description: |-
+ &b Affiche un statut
+ &b pour chaque phase
+ &b dans la Barre d'Action.
aoneblock:
bossbar:
title: Blocs restants
diff --git a/src/main/resources/locales/hr.yml b/src/main/resources/locales/hr.yml
index 8a7141f9..34a98ad3 100644
--- a/src/main/resources/locales/hr.yml
+++ b/src/main/resources/locales/hr.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Zaštita Magičnog Bloka
+ description: |-
+ &b Rang koji može razbiti
+ &b magični blok, ako
+ &b može razbiti blokove.
+ hint: "&c Vaš rang ne može razbiti magični blok!"
START_SAFETY:
- name: Pokretanje sigurnosti
- description: |
+ name: Početna Sigurnost
+ description: |-
&b Sprječava nove igrače
- &b od kretanja u 1 minutu
- &b Tako da ne padaju.
- hint: '&c Kretanje je blokirano zbog sigurnosti za [number] više sekundi!'
- free-to-move: '&a Slobodno se krećete. '
+ &b da se kreću 1 minutu
+ &b da ne padnu.
+ hint: "&c Kretanje je blokirano iz sigurnosnih razloga još [number] sekundi!"
+ free-to-move: "&a Slobodni ste za kretanje. Budite oprezni!"
ONEBLOCK_BOSSBAR:
- name: Boss bar
- description: |
- &b Prikazuje traku statusa
- &b za svaku fazu.
+ name: Boss Traka
+ description: |-
+ &b Prikazuje statusnu traku
+ &b za svaku fazu.
+ ONEBLOCK_ACTIONBAR:
+ name: Traka Akcije
+ description: |-
+ &b Prikazuje status
+ &b za svaku fazu
+ &b u Traci Akcije.
aoneblock:
bossbar:
title: Preostali blokovi
diff --git a/src/main/resources/locales/hu.yml b/src/main/resources/locales/hu.yml
index f49fe4b7..4b5b6a81 100644
--- a/src/main/resources/locales/hu.yml
+++ b/src/main/resources/locales/hu.yml
@@ -1,20 +1,32 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Mágikus Blokk Védelem
+ description: |-
+ &b Rang, amely képes
+ &b szétrombolni a mágikus
+ &b blokkot, ha tud blokkokat
+ &b rombolni.
+ hint: "&c A rangod nem törheti szét a mágikus blokkot!"
START_SAFETY:
- name: Induló biztonság
- description: |
+ name: Kezdő Biztonság
+ description: |-
&b Megakadályozza az új játékosokat
- &b 1 percig mozogva
- &b Tehát nem esnek le.
- hint: >-
- &c A mozgás blokkolva a biztonság érdekében, a [number] több
- másodpercre!
- free-to-move: '&a Szabadon mozoghatsz. '
+ &b a mozgásban 1 percig,
+ &b hogy ne essenek le.
+ hint: "&c Mozgás blokkolva biztonsági okokból még [number] másodpercig!"
+ free-to-move: "&a Szabadon mozoghatsz. Légy óvatos!"
ONEBLOCK_BOSSBAR:
- name: Főnök
- description: |
- &b Mutat egy állapotsorot
- &b minden fázisra.
+ name: Boss Bar
+ description: |-
+ &b Állapotjelző sávot
+ &b mutat minden fázishoz.
+ ONEBLOCK_ACTIONBAR:
+ name: Műveleti Sáv (Action Bar)
+ description: |-
+ &b Állapotot mutat
+ &b minden fázishoz
+ &b a Műveleti Sávban.
aoneblock:
bossbar:
title: Blokkok maradtak
diff --git a/src/main/resources/locales/id.yml b/src/main/resources/locales/id.yml
index b680c6a3..8fa45c9d 100644
--- a/src/main/resources/locales/id.yml
+++ b/src/main/resources/locales/id.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Perlindungan Blok Ajaib
+ description: |-
+ &b Pangkat yang dapat
+ &b menghancurkan blok ajaib
+ &b jika mereka dapat menghancurkan blok.
+ hint: "&c Pangkatmu tidak dapat menghancurkan blok ajaib!"
START_SAFETY:
- name: Mulai keamanan
- description: |
+ name: Keamanan Awal
+ description: |-
&b Mencegah pemain baru
- &b dari bergerak selama 1 menit
- &b Jadi mereka tidak jatuh.
- hint: '&c Gerakan diblokir untuk keamanan selama [number] lebih banyak detik!'
- free-to-move: '&a Anda bebas untuk pindah. '
+ &b bergerak selama 1 menit
+ &b agar mereka tidak jatuh.
+ hint: "&c Pergerakan diblokir untuk keselamatan selama [number] detik lagi!"
+ free-to-move: "&a Anda bebas bergerak. Hati-hati!"
ONEBLOCK_BOSSBAR:
- name: Bos Bar
- description: |
- &b Menunjukkan bilah status
- &b untuk setiap fase.
+ name: Boss Bar
+ description: |-
+ &b Menampilkan bilah status
+ &b untuk setiap fase.
+ ONEBLOCK_ACTIONBAR:
+ name: Action Bar
+ description: |-
+ &b Menampilkan status
+ &b untuk setiap fase
+ &b di Action Bar.
aoneblock:
bossbar:
title: Blok tersisa
diff --git a/src/main/resources/locales/it.yml b/src/main/resources/locales/it.yml
index 17269d8d..f8c6a343 100644
--- a/src/main/resources/locales/it.yml
+++ b/src/main/resources/locales/it.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Protezione Blocco Magico
+ description: |-
+ &b Rango che può rompere il
+ &b blocco magico se può
+ &b rompere i blocchi.
+ hint: "&c Il tuo rango non può rompere il blocco magico!"
START_SAFETY:
- name: Avvio della sicurezza
- description: |
- &b Impedisce nuovi giocatori
- &b dal muoversi per 1 minuto
- &b Quindi non cadono.
- hint: '&c Movimento bloccato per sicurezza per [number] più secondi!'
- free-to-move: '&a Sei libero di muoverti. '
+ name: Sicurezza Iniziale
+ description: |-
+ &b Impedisce ai nuovi giocatori
+ &b di muoversi per 1 minuto
+ &b in modo che non cadano.
+ hint: "&c Movimento bloccato per sicurezza per [number] secondi ancora!"
+ free-to-move: "&a Sei libero di muoverti. Fai attenzione!"
ONEBLOCK_BOSSBAR:
- name: Boss Bar
- description: |
- &b Mostra una barra di stato
- &b per ogni fase.
+ name: Boss Bar
+ description: |-
+ &b Mostra una barra di stato
+ &b per ogni fase.
+ ONEBLOCK_ACTIONBAR:
+ name: Action Bar
+ description: |-
+ &b Mostra uno stato
+ &b per ogni fase
+ &b nella Action Bar.
aoneblock:
bossbar:
title: Blocca i restanti
diff --git a/src/main/resources/locales/ja.yml b/src/main/resources/locales/ja.yml
index 1d980f27..652b3115 100644
--- a/src/main/resources/locales/ja.yml
+++ b/src/main/resources/locales/ja.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: 魔法ブロック保護
+ description: |-
+ &b ブロックを破壊できる場合、
+ &b 魔法ブロックを破壊できる
+ &b ランク。
+ hint: "&c あなたのランクでは魔法ブロックを破壊できません!"
START_SAFETY:
- name: 安全性の開始
- description: |
- &b 新しいプレイヤーを防ぎます
- &b 1分間移動することから
- &b だから彼らは落ちません。
- hint: '&c [number]のために安全のために動きがブロックされました。'
- free-to-move: '&a あなたは自由に動くことができます。'
+ name: 開始時の安全対策
+ description: |-
+ &b 新しいプレイヤーが
+ &b 1分間移動するのを防ぎ、
+ &b 落下を防ぎます。
+ hint: "&c 安全のため、あと [number] 秒間移動がブロックされています!"
+ free-to-move: "&a 自由に動けます。注意してください!"
ONEBLOCK_BOSSBAR:
- name: ボスバー
- description: |
- &b ステータスバーを表示します
- &b 各フェーズについて。
+ name: ボスバー
+ description: |-
+ &b 各フェーズの
+ &b ステータスバーを表示します。
+ ONEBLOCK_ACTIONBAR:
+ name: アクションバー
+ description: |-
+ &b 各フェーズの
+ &b ステータスを
+ &b アクションバーに表示します。
aoneblock:
bossbar:
title: 残りのブロック
diff --git a/src/main/resources/locales/pl.yml b/src/main/resources/locales/pl.yml
index 4b12c92a..7a14e0e0 100644
--- a/src/main/resources/locales/pl.yml
+++ b/src/main/resources/locales/pl.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Ochrona Magicznego Bloku
+ description: |-
+ &b Ranga, która może zniszczyć
+ &b magiczny blok, jeśli
+ &b może niszczyć bloki.
+ hint: "&c Twoja ranga nie może zniszczyć magicznego bloku!"
START_SAFETY:
- name: Początkowe bezpieczeństwo
- description: |
- &b Zapobiega nowych graczy
- &b Od przeprowadzki na 1 minutę
- &b Więc nie spadają.
- hint: '&c Ruch zablokowany dla bezpieczeństwa przez [number] więcej sekund!'
- free-to-move: '&a Możesz się poruszać. '
+ name: Bezpieczeństwo Początkowe
+ description: |-
+ &b Zapobiega poruszaniu się
+ &b nowym graczom przez 1 minutę,
+ &b aby nie spadli.
+ hint: "&c Ruch zablokowany ze względów bezpieczeństwa na kolejne [number] sekund!"
+ free-to-move: "&a Możesz się swobodnie poruszać. Bądź ostrożny!"
ONEBLOCK_BOSSBAR:
- name: Bar Boss
- description: |
- &b Pokazuje pasek stanu
- &b dla każdej fazy.
+ name: Pasek Bossa
+ description: |-
+ &b Pokazuje pasek statusu
+ &b dla każdej fazy.
+ ONEBLOCK_ACTIONBAR:
+ name: Pasek Akcji
+ description: |-
+ &b Pokazuje status
+ &b dla każdej fazy
+ &b na Pasku Akcji.
aoneblock:
bossbar:
title: Pozostałe bloki
diff --git a/src/main/resources/locales/pt.yml b/src/main/resources/locales/pt.yml
index c9617f8d..223591b2 100644
--- a/src/main/resources/locales/pt.yml
+++ b/src/main/resources/locales/pt.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Proteção de Bloco Mágico
+ description: |-
+ &b Rank que pode quebrar o
+ &b bloco mágico se puder
+ &b quebrar blocos.
+ hint: "&c Seu rank não pode quebrar o bloco mágico!"
START_SAFETY:
- name: Segurança inicial
- description: |
- &b Impede novos jogadores
- &b de se mudar por 1 minuto
- &b Então eles não caem.
- hint: '&c Movimento bloqueado por segurança por [número] mais segundos!'
- free-to-move: '&a Você está livre para se mover. '
+ name: Segurança Inicial
+ description: |-
+ &b Impede que novos jogadores
+ &b se movam por 1 minuto
+ &b para que não caiam.
+ hint: "&c Movimento bloqueado por segurança por mais [number] segundos!"
+ free-to-move: "&a Você está livre para se mover. Tenha cuidado!"
ONEBLOCK_BOSSBAR:
- name: Boss Bar
- description: |
- &b Mostra uma barra de status
- &b para cada fase.
+ name: Boss Bar
+ description: |-
+ &b Mostra uma barra de status
+ &b para cada fase.
+ ONEBLOCK_ACTIONBAR:
+ name: Action Bar
+ description: |-
+ &b Mostra um status
+ &b para cada fase
+ &b na Action Bar.
aoneblock:
bossbar:
title: Bloqueia o restante
diff --git a/src/main/resources/locales/ru.yml b/src/main/resources/locales/ru.yml
index 156a930d..ab82eda7 100644
--- a/src/main/resources/locales/ru.yml
+++ b/src/main/resources/locales/ru.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Защита Магического Блока
+ description: |-
+ &b Ранг, который может сломать
+ &b магический блок, если
+ &b он может ломать блоки.
+ hint: "&c Ваш ранг не может сломать магический блок!"
START_SAFETY:
- name: Начальная безопасность
- description: |
- &b Предотвращает новых игроков
- &b от переезда на 1 минуту
- &b Так что они не падают.
- hint: '&c Движение заблокировано для безопасности для [number] больше секунд!'
- free-to-move: '&a Вы можете свободно двигаться. '
+ name: Начальная Безопасность
+ description: |-
+ &b Предотвращает движение
+ &b новых игроков в течение 1 минуты,
+ &b чтобы они не упали.
+ hint: "&c Движение заблокировано в целях безопасности еще на [number] секунд!"
+ free-to-move: "&a Вы можете свободно двигаться. Будьте осторожны!"
ONEBLOCK_BOSSBAR:
- name: Boss Bar
- description: |
- &b Показывает строку статуса
- &b Для каждого этапа.
+ name: Boss Bar
+ description: |-
+ &b Показывает панель состояния
+ &b для каждой фазы.
+ ONEBLOCK_ACTIONBAR:
+ name: Action Bar
+ description: |-
+ &b Показывает статус
+ &b для каждой фазы
+ &b в Action Bar.
aoneblock:
bossbar:
title: Блоки остались
diff --git a/src/main/resources/locales/tr.yml b/src/main/resources/locales/tr.yml
index 6c1d5071..8a11ab93 100644
--- a/src/main/resources/locales/tr.yml
+++ b/src/main/resources/locales/tr.yml
@@ -1,17 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Büyülü Blok Koruması
+ description: |-
+ &b Blokları kırabilirlerse
+ &b büyülü bloğu kırabilecek
+ &b rütbe.
+ hint: "&c Rütbeniz büyülü bloğu kıramaz!"
START_SAFETY:
- name: Güvenli mod başlatılıyor
- description: |
- &b Yeni oyuncuları 1 dakika boyunca kıpırdamasını engeller
- &b böylece aşağı düşmezler.
- hint: '&c Haraketler [number] saniye daha güvenlik için engellenmiştir!'
- free-to-move: '&a Artık kıpırdayabilirsin dikkatli ol!'
+ name: Başlangıç Güvenliği
+ description: |-
+ &b Yeni oyuncuların 1 dakika
+ &b boyunca hareket etmesini
+ &b engelleyerek düşmelerini önler.
+ hint: "&c Güvenlik için hareket [number] saniye daha engellendi!"
+ free-to-move: "&a Serbestçe hareket edebilirsiniz. Dikkatli olun!"
ONEBLOCK_BOSSBAR:
- name: Patron bar
- description: |
- &b Bir durum çubuğu gösterir
- &b her aşama için.
+ name: Boss Çubuğu
+ description: |-
+ &b Her aşama için bir
+ &b durum çubuğu gösterir.
+ ONEBLOCK_ACTIONBAR:
+ name: Eylem Çubuğu (Action Bar)
+ description: |-
+ &b Her aşama için bir
+ &b durumu Eylem Çubuğunda
+ &b gösterir.
aoneblock:
bossbar:
title: Kalan bloklar
diff --git a/src/main/resources/locales/uk.yml b/src/main/resources/locales/uk.yml
index 8c742a19..2dbd180e 100644
--- a/src/main/resources/locales/uk.yml
+++ b/src/main/resources/locales/uk.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Захист Магічного Блоку
+ description: |-
+ &b Ранг, який може зламати
+ &b магічний блок, якщо
+ &b може ламати блоки.
+ hint: "&c Ваш ранг не може зламати магічний блок!"
START_SAFETY:
- name: Початкова безпека
- description: |
- &b Запобігає новим гравцям
- &b від переміщення протягом 1 хвилини
- &b Тож вони не падають.
- hint: '&c Рух заблокований для безпеки для [number] більше секунд!'
- free-to-move: '&a Ви вільно рухаєтесь. '
+ name: Початкова Безпека
+ description: |-
+ &b Запобігає руху нових гравців
+ &b протягом 1 хвилини,
+ &b щоб вони не впали.
+ hint: "&c Рух заблоковано з міркувань безпеки ще на [number] секунд!"
+ free-to-move: "&a Ви можете вільно рухатися. Будьте обережні!"
ONEBLOCK_BOSSBAR:
- name: Бар для боса
- description: |
- &b Показує панель стану
- &b для кожної фази.
+ name: Boss Bar
+ description: |-
+ &b Показує панель стану
+ &b для кожної фази.
+ ONEBLOCK_ACTIONBAR:
+ name: Action Bar
+ description: |-
+ &b Показує статус
+ &b для кожної фази
+ &b в Action Bar.
aoneblock:
bossbar:
title: Блоки, що залишилися
diff --git a/src/main/resources/locales/vi.yml b/src/main/resources/locales/vi.yml
index 0d25e415..19485439 100644
--- a/src/main/resources/locales/vi.yml
+++ b/src/main/resources/locales/vi.yml
@@ -1,18 +1,31 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: Bảo Vệ Khối Ma Thuật
+ description: |-
+ &b Xếp hạng có thể phá
+ &b khối ma thuật nếu họ
+ &b có thể phá khối.
+ hint: "&c Xếp hạng của bạn không thể phá khối ma thuật!"
START_SAFETY:
- name: Khởi đầu an toàn
- description: |
- &b Ngăn chặn người chơi mới
- &b Từ việc di chuyển trong 1 phút
- &b Vì vậy, họ không rơi ra.
- hint: '&c Chuyển động bị chặn để an toàn cho [number] thêm giây!'
- free-to-move: '&a Bạn có thể tự do di chuyển. '
+ name: An Toàn Khởi Đầu
+ description: |-
+ &b Ngăn người chơi mới
+ &b di chuyển trong 1 phút
+ &b để họ không bị rơi.
+ hint: "&c Di chuyển bị chặn vì lý do an toàn trong [number] giây nữa!"
+ free-to-move: "&a Bạn được phép di chuyển tự do. Hãy cẩn thận!"
ONEBLOCK_BOSSBAR:
- name: Boss Bar
- description: |
- &b Hiển thị một thanh trạng thái
- &b cho mỗi pha.
+ name: Thanh Boss
+ description: |-
+ &b Hiển thị thanh trạng thái
+ &b cho mỗi giai đoạn.
+ ONEBLOCK_ACTIONBAR:
+ name: Thanh Hành Động (Action Bar)
+ description: |-
+ &b Hiển thị trạng thái
+ &b cho mỗi giai đoạn
+ &b trên Thanh Hành Động.
aoneblock:
bossbar:
title: Khối còn lại
diff --git a/src/main/resources/locales/zh-CN.yml b/src/main/resources/locales/zh-CN.yml
index 1d33b340..3b736e8f 100644
--- a/src/main/resources/locales/zh-CN.yml
+++ b/src/main/resources/locales/zh-CN.yml
@@ -1,18 +1,30 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: 魔法方块保护
+ description: |-
+ &b 如果玩家可以破坏方块,
+ &b 则该等级可以破坏
+ &b 魔法方块。
+ hint: "&c 您的等级无法破坏魔法方块!"
START_SAFETY:
- name: 开始安全
- description: |
- &b 防止新球员
- &b 从移动1分钟
- &b 所以他们不会掉下来。
- hint: '&c 移动被阻塞,以确保[number]更多秒!'
- free-to-move: '&a 您可以自由移动。'
+ name: 初始安全保护
+ description: |-
+ &b 阻止新玩家在1分钟内
+ &b 移动,以防他们跌落。
+ hint: "&c 出于安全考虑,移动已被阻止 [number] 秒!"
+ free-to-move: "&a 您可以自由移动了。请小心!"
ONEBLOCK_BOSSBAR:
- name: 老板酒吧
- description: |
- &b 显示状态栏
- &b 对于每个阶段。
+ name: Boss 血条
+ description: |-
+ &b 为每个阶段
+ &b 显示一个状态条。
+ ONEBLOCK_ACTIONBAR:
+ name: 动作栏
+ description: |-
+ &b 在动作栏中
+ &b 显示每个阶段
+ &b 的状态。
aoneblock:
bossbar:
title: 剩余的块
diff --git a/src/main/resources/locales/zh-TW.yml b/src/main/resources/locales/zh-TW.yml
index 24c830fb..90c15699 100644
--- a/src/main/resources/locales/zh-TW.yml
+++ b/src/main/resources/locales/zh-TW.yml
@@ -1,18 +1,30 @@
protection:
flags:
+ MAGIC_BLOCK:
+ name: 魔法方塊保護
+ description: |-
+ &b 如果玩家可以破壞方塊,
+ &b 則該等級可以破壞
+ &b 魔法方塊。
+ hint: "&c 您的等級無法破壞魔法方塊!"
START_SAFETY:
- name: 開始安全
- description: |
- &b 防止新球員
- &b 從移動1分鐘
- &b 所以他們不會掉下來。
- hint: '&c 移動被阻塞,以確保[number]更多秒!'
- free-to-move: '&a 您可以自由移動。當心!'
+ name: 初始安全保護
+ description: |-
+ &b 阻止新玩家在1分鐘內
+ &b 移動,以防他們跌落。
+ hint: "&c 出於安全考慮,移動已被阻止 [number] 秒!"
+ free-to-move: "&a 您可以自由移動了。請小心!"
ONEBLOCK_BOSSBAR:
- name: 老闆酒吧
- description: |
- &b 顯示狀態欄
- &b 對於每個階段。
+ name: Boss 血條
+ description: |-
+ &b 為每個階段
+ &b 顯示一個狀態條。
+ ONEBLOCK_ACTIONBAR:
+ name: 動作欄
+ description: |-
+ &b 在動作欄中
+ &b 顯示每個階段
+ &b 的狀態。
aoneblock:
bossbar:
title: 剩餘的塊
diff --git a/src/test/java/world/bentobox/aoneblock/AOneBlockTest.java b/src/test/java/world/bentobox/aoneblock/AOneBlockTest.java
index 1b0d21c7..5be15415 100644
--- a/src/test/java/world/bentobox/aoneblock/AOneBlockTest.java
+++ b/src/test/java/world/bentobox/aoneblock/AOneBlockTest.java
@@ -1,356 +1,286 @@
package world.bentobox.aoneblock;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.RETURNS_MOCKS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import java.beans.IntrospectionException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
-import java.util.Comparator;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
-import java.util.logging.Logger;
-import org.bukkit.Bukkit;
-import org.bukkit.Server;
-import org.bukkit.entity.Player;
-import org.bukkit.plugin.PluginManager;
import org.eclipse.jdt.annotation.NonNull;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockbukkit.mockbukkit.MockBukkit;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.mockito.Mock;
+import org.mockito.MockedStatic;
import org.mockito.Mockito;
-import org.mockito.stubbing.Answer;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-import org.powermock.reflect.Whitebox;
import world.bentobox.aoneblock.dataobjects.OneBlockIslands;
-import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.Settings;
import world.bentobox.bentobox.api.addons.Addon.State;
import world.bentobox.bentobox.api.addons.AddonDescription;
-import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.AbstractDatabaseHandler;
import world.bentobox.bentobox.database.DatabaseSetup;
import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType;
-import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.managers.AddonsManager;
import world.bentobox.bentobox.managers.CommandsManager;
import world.bentobox.bentobox.managers.FlagsManager;
-import world.bentobox.bentobox.managers.IslandWorldManager;
-import world.bentobox.bentobox.managers.IslandsManager;
-import world.bentobox.bentobox.managers.PlaceholdersManager;
/**
* @author tastybento
*
*/
-@RunWith(PowerMockRunner.class)
-@PrepareForTest({ Bukkit.class, BentoBox.class, User.class, Config.class, DatabaseSetup.class })
-public class AOneBlockTest {
-
- @Mock
- private User user;
- @Mock
- private IslandsManager im;
- @Mock
- private Island island;
-
- private AOneBlock addon;
- @Mock
- private BentoBox plugin;
- @Mock
- private FlagsManager fm;
- @Mock
- private Settings settings;
- @Mock
- private PlaceholdersManager phm;
-
- private static AbstractDatabaseHandler