mirror of
https://github.com/BentoBoxWorld/BSkyBlock.git
synced 2024-12-28 17:27:35 +01:00
Merge remote-tracking branch 'origin/develop'
Conflicts: pom.xml
This commit is contained in:
commit
cc0b454aee
16
README.md
16
README.md
@ -15,14 +15,14 @@ BSkyBlock provides a skyblock-type Minecraft game for players that supports a de
|
||||
|
||||
## 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.
|
||||
4. Stop the server .
|
||||
5. Edit the config.yml 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.
|
||||
5. Stop the server .
|
||||
6. Edit the config.yml how you want.
|
||||
7. Delete any worlds that were created by default if you made changes that would affect them.
|
||||
8. Restart the server.
|
||||
|
||||
## Config.yml
|
||||
|
||||
|
4
pom.xml
4
pom.xml
@ -59,13 +59,13 @@
|
||||
<powermock.version>2.0.2</powermock.version>
|
||||
<!-- More visible way how to change dependency versions -->
|
||||
<spigot.version>1.15.2-R0.1-SNAPSHOT</spigot.version>
|
||||
<bentobox.version>1.12.0</bentobox.version>
|
||||
<bentobox.version>1.13.1</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.12.0</build.version>
|
||||
<build.version>1.13.0</build.version>
|
||||
</properties>
|
||||
|
||||
<!-- Profiles will allow to automatically change build version. -->
|
||||
|
@ -40,6 +40,10 @@ public class Settings implements WorldSettings {
|
||||
@ConfigEntry(path = "bskyblock.command.admin", since = "1.3.0")
|
||||
private String adminCommand = "bsbadmin bsb skyblockadmin sbadmin sba";
|
||||
|
||||
@ConfigComment("Use control panel if it exists (ControlPanel addon must be in addons)")
|
||||
@ConfigEntry(path = "bskyblock.use-control-panel", since = "1.13.0")
|
||||
private boolean useControlPanel = false;
|
||||
|
||||
/* WORLD */
|
||||
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
|
||||
@ConfigEntry(path = "world.friendly-name")
|
||||
@ -225,6 +229,18 @@ public class Settings implements WorldSettings {
|
||||
@ConfigEntry(path = "island.max-team-size")
|
||||
private int maxTeamSize = 4;
|
||||
|
||||
@ConfigComment("Default maximum number of coop rank members per island")
|
||||
@ConfigComment("Players can have the bskyblock.coop.maxsize.<number> 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")
|
||||
private int maxCoopSize = 4;
|
||||
|
||||
@ConfigComment("Default maximum number of trusted rank members per island")
|
||||
@ConfigComment("Players can have the bskyblock.trust.maxsize.<number> 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")
|
||||
private int maxTrustSize = 4;
|
||||
|
||||
@ConfigComment("Default maximum number of homes a player can have. Min = 1")
|
||||
@ConfigComment("Accessed via /is sethome <number> or /is go <number>")
|
||||
@ConfigEntry(path = "island.max-homes")
|
||||
@ -1566,4 +1582,48 @@ public class Settings implements WorldSettings {
|
||||
public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns) {
|
||||
this.ticksPerMonsterSpawns = ticksPerMonsterSpawns;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maxCoopSize
|
||||
*/
|
||||
@Override
|
||||
public int getMaxCoopSize() {
|
||||
return maxCoopSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxCoopSize the maxCoopSize to set
|
||||
*/
|
||||
public void setMaxCoopSize(int maxCoopSize) {
|
||||
this.maxCoopSize = maxCoopSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maxTrustSize
|
||||
*/
|
||||
@Override
|
||||
public int getMaxTrustSize() {
|
||||
return maxTrustSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxTrustSize the maxTrustSize to set
|
||||
*/
|
||||
public void setMaxTrustSize(int maxTrustSize) {
|
||||
this.maxTrustSize = maxTrustSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the useControlPanel
|
||||
*/
|
||||
public boolean isUseControlPanel() {
|
||||
return useControlPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param useControlPanel the useControlPanel to set
|
||||
*/
|
||||
public void setUseControlPanel(boolean useControlPanel) {
|
||||
this.useControlPanel = useControlPanel;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminDeleteCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminEmptyTrashCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminGetrankCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminInfoCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminRegisterCommand;
|
||||
@ -14,9 +13,7 @@ import world.bentobox.bentobox.api.commands.admin.AdminSetrankCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSetspawnCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSettingsCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSwitchCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSwitchtoCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminTeleportCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminTrashCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminUnregisterCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminVersionCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminWhyCommand;
|
||||
@ -81,9 +78,9 @@ public class AdminCommand extends CompositeCommand {
|
||||
// Reset flags
|
||||
new AdminResetFlagsCommand(this);
|
||||
// Trash
|
||||
new AdminTrashCommand(this);
|
||||
new AdminEmptyTrashCommand(this);
|
||||
new AdminSwitchtoCommand(this);
|
||||
//new AdminTrashCommand(this);
|
||||
//new AdminEmptyTrashCommand(this);
|
||||
//new AdminSwitchtoCommand(this);
|
||||
// Switch
|
||||
new AdminSwitchCommand(this);
|
||||
// Purge
|
||||
|
@ -23,7 +23,7 @@ public class IslandAboutCommand extends CompositeCommand {
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
user.sendRawMessage("About " + getAddon().getDescription().getName() + " " + getAddon().getDescription().getVersion() + ":");
|
||||
user.sendRawMessage("Copyright (c) 2017 - 2019 tastybento, Poslovitch");
|
||||
user.sendRawMessage("Copyright (c) 2017 - 2020 tastybento, Poslovitch");
|
||||
user.sendRawMessage("See https://www.eclipse.org/legal/epl-2.0/");
|
||||
user.sendRawMessage("for license information.");
|
||||
return true;
|
||||
|
@ -73,6 +73,10 @@ public class IslandCommand extends CompositeCommand {
|
||||
if (args.isEmpty()) {
|
||||
// If user has an island, go
|
||||
if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) {
|
||||
if (((BSkyBlock)getAddon()).getSettings().isUseControlPanel()
|
||||
&& getSubCommand("controlpanel").isPresent()) {
|
||||
return getSubCommand("controlpanel").get().call(user, label, new ArrayList<>());
|
||||
}
|
||||
return getSubCommand("go").map(goCmd -> goCmd.call(user, goCmd.getLabel(), new ArrayList<>())).orElse(false);
|
||||
}
|
||||
// No islands currently
|
||||
|
@ -9,6 +9,8 @@ bskyblock:
|
||||
# To define alias, just separate commands with white space.
|
||||
# Added since 1.3.0.
|
||||
admin: bsbadmin bsb skyblockadmin sbadmin sba
|
||||
# Use control panel if it exists (ControlPanel addon must be in addons)
|
||||
use-control-panel: false
|
||||
world:
|
||||
# Friendly name for this world. Used in admin commands. Must be a single word
|
||||
friendly-name: BSkyBlock
|
||||
@ -222,6 +224,17 @@ island:
|
||||
# Default max team size
|
||||
# Permission size cannot be less than the default below.
|
||||
max-team-size: 4
|
||||
# Default maximum number of coop rank members per island
|
||||
# Players can have the bskyblock.coop.maxsize.<number> 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 bskyblock.trust.maxsize.<number> 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 <number> or /is go <number>
|
||||
max-homes: 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package world.bentobox.bskyblock.commands;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@ -40,7 +37,7 @@ import world.bentobox.bskyblock.Settings;
|
||||
@PrepareForTest({Bukkit.class, BentoBox.class, User.class })
|
||||
public class AdminCommandTest {
|
||||
|
||||
private static final int NUM_COMMANDS = 29;
|
||||
private static final int NUM_COMMANDS = 26;
|
||||
@Mock
|
||||
private User user;
|
||||
@Mock
|
||||
|
@ -33,7 +33,7 @@ public class IslandAboutCommandTest {
|
||||
User user = mock(User.class);
|
||||
c.execute(user, "", Collections.emptyList());
|
||||
// Verify
|
||||
Mockito.verify(user).sendRawMessage(Mockito.eq("Copyright (c) 2017 - 2019 tastybento, Poslovitch"));
|
||||
Mockito.verify(user).sendRawMessage(Mockito.eq("Copyright (c) 2017 - 2020 tastybento, Poslovitch"));
|
||||
Mockito.verify(user).sendRawMessage(Mockito.eq("About BSkyBlock 1.2.3:"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user