Add support for banned falling commands.

https://github.com/BentoBoxWorld/BentoBox/issues/863
This commit is contained in:
tastybento 2019-10-03 14:26:10 -07:00
parent d9cba6cd07
commit bd028988eb
2 changed files with 25 additions and 0 deletions

View File

@ -193,6 +193,11 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.visitor-banned-commands")
private List<String> visitorBannedCommands = new ArrayList<>();
@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")
private List<String> fallingBannedCommands = new ArrayList<>();
// ---------------------------------------------
/* ISLAND */
@ -533,6 +538,14 @@ public class Settings implements WorldSettings {
return visitorBannedCommands;
}
/**
* @return the fallingBannedCommands
*/
@Override
public List<String> getFallingBannedCommands() {
return fallingBannedCommands;
}
/**
* @return the maxTeamSize
*/
@ -891,6 +904,13 @@ public class Settings implements WorldSettings {
this.visitorBannedCommands = visitorBannedCommands;
}
/**
* @param fallingBannedCommands the fallingBannedCommands to set
*/
public void setFallingBannedCommands(List<String> fallingBannedCommands) {
this.fallingBannedCommands = fallingBannedCommands;
}
/**
* @param maxTeamSize the maxTeamSize to set
*/

View File

@ -190,6 +190,11 @@ world:
visitor-banned-commands:
- spawner
- spawnmob
# Falling banned commands - players cannot use these commands when falling
# if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active
falling-banned-commands:
- warp
- spawn
island:
# Default max team size
# Permission size cannot be less than the default below.