This commit is contained in:
tastybento 2019-02-16 22:32:33 -08:00
commit 6b953930c7
6 changed files with 98 additions and 6 deletions

24
.github/ISSUE_TEMPLATE/support.md vendored Normal file
View File

@ -0,0 +1,24 @@
---
name: Support request
about: Request for help
---
**Description**
A clear and concise description of what your problem is.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Server Information:**
[Please complete the following information:]
- Database being used (Flat file, MySQL, Mongo): []
- OS: [e.g. iOS]
- Java Version: [e.g. Java 8]
- BentoBox version: [e.g. 1.7.2.21]
- Addons installed? [Do '/bentobox version' and copy/paste from the console]
- Other plugins? [Do '/plugins' and copy/paste from the console]
**Additional context**
Add any other context about the problem here.

View File

@ -30,6 +30,17 @@ import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2;
@ConfigComment("BSkyBlock Configuration [version]")
public class Settings implements DataObject, WorldSettings {
/* Commands */
@ConfigComment("Island Command. What command users will run to access their island.")
@ConfigComment("To define alias, just separate commands with white space.")
@ConfigEntry(path = "bskyblock.command.island")
private String islandCommand = "island is";
@ConfigComment("The island admin command.")
@ConfigComment("To define alias, just separate commands with white space.")
@ConfigEntry(path = "bskyblock.command.admin")
private String adminCommand = "bsbadmin bsb";
/* WORLD */
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
@ConfigEntry(path = "world.friendly-name")
@ -1100,4 +1111,46 @@ public class Settings implements DataObject, WorldSettings {
public void setBanLimit(int banLimit) {
this.banLimit = banLimit;
}
/**
* This method returns the islandCommand value.
* @return the value of islandCommand.
*/
public String getIslandCommand()
{
return islandCommand;
}
/**
* This method sets the islandCommand value.
* @param islandCommand the islandCommand new value.
*
*/
public void setIslandCommand(String islandCommand)
{
this.islandCommand = islandCommand;
}
/**
* This method returns the adminCommand value.
* @return the value of adminCommand.
*/
public String getAdminCommand()
{
return adminCommand;
}
/**
* This method sets the adminCommand value.
* @param adminCommand the adminCommand new value.
*
*/
public void setAdminCommand(String adminCommand)
{
this.adminCommand = adminCommand;
}
}

View File

@ -30,7 +30,9 @@ import world.bentobox.bskyblock.BSkyBlock;
public class AdminCommand extends CompositeCommand {
public AdminCommand(BSkyBlock addon) {
super(addon, "bsbadmin", "bsb");
super(addon,
addon.getSettings().getAdminCommand().split(" ")[0],
addon.getSettings().getAdminCommand().split(" "));
}
@Override

View File

@ -25,7 +25,9 @@ import world.bentobox.bskyblock.BSkyBlock;
public class IslandCommand extends CompositeCommand {
public IslandCommand(BSkyBlock addon) {
super(addon, "island", "is");
super(addon,
addon.getSettings().getIslandCommand().split(" ")[0],
addon.getSettings().getIslandCommand().split(" "));
}
/* (non-Javadoc)

View File

@ -19,7 +19,7 @@ permissions:
description: Let the player use the sethome command
default: true
bskyblock.island.info:
description: Let the player check their island level
description: Let the player check other players info
default: true
bskyblock.island.lock:
description: Allows island locking
@ -54,6 +54,9 @@ permissions:
bskyblock.island.team.coop:
description: Let a player use team coop commands
default: true
bskyblock.island.team.promote:
description: Let a player use promote commands
default: true
bskyblock.settings.*:
description: Allow use of settings on island
default: true
@ -66,9 +69,6 @@ permissions:
bskyblock.mod.clearreset:
description: Allow clearing of island reset limit
default: false
bskyblock.mod.tp:
description: Allows teleport to an island
default: op
bskyblock.mod.bypasscooldowns:
description: Allow moderator to bypass cooldowns
default: op
@ -93,6 +93,9 @@ permissions:
bskyblock.mod.resetname:
description: Enables reset of player's island names
default: false
bskyblock.admin.tp:
description: Allows teleport to an island
default: op
bskyblock.admin.clearresetall:
description: Allow clearing of island reset limit of all players
default: op

View File

@ -1,4 +1,12 @@
# BSkyBlock Configuration ${version}
bskyblock:
command:
# Island Command. What command users will run to access their island.
# To define alias, just separate commands with white space.
island: island is
# The island admin command.
# To define alias, just separate commands with white space.
admin: bsbadmin bsb
world:
# Friendly name for this world. Used in admin commands. Must be a single word
friendly-name: BSkyBlock