mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-27 11:37:36 +01:00
Fixed "island.maxhomes" permission not being appended with the addon's permission prefix
This may help for #256.
This commit is contained in:
parent
95bfab916e
commit
5391544e9c
@ -33,7 +33,7 @@ public class IslandGoCommand extends CompositeCommand {
|
|||||||
}
|
}
|
||||||
if (!args.isEmpty() && NumberUtils.isDigits(args.get(0))) {
|
if (!args.isEmpty() && NumberUtils.isDigits(args.get(0))) {
|
||||||
int homeValue = Integer.parseInt(args.get(0));
|
int homeValue = Integer.parseInt(args.get(0));
|
||||||
int maxHomes = user.getPermissionValue("island.maxhomes", getIWM().getMaxHomes(getWorld()));
|
int maxHomes = user.getPermissionValue(getPermissionPrefix() + "island.maxhomes", getIWM().getMaxHomes(getWorld()));
|
||||||
if (homeValue > 1 && homeValue <= maxHomes) {
|
if (homeValue > 1 && homeValue <= maxHomes) {
|
||||||
getIslands().homeTeleport(getWorld(), user.getPlayer(), homeValue);
|
getIslands().homeTeleport(getWorld(), user.getPlayer(), homeValue);
|
||||||
user.sendMessage("commands.island.go.tip", TextVariables.LABEL, getTopLabel());
|
user.sendMessage("commands.island.go.tip", TextVariables.LABEL, getTopLabel());
|
||||||
|
@ -39,7 +39,7 @@ public class IslandSethomeCommand extends CompositeCommand {
|
|||||||
user.sendMessage("commands.island.sethome.home-set");
|
user.sendMessage("commands.island.sethome.home-set");
|
||||||
} else {
|
} else {
|
||||||
// Dynamic home sizes with permissions
|
// Dynamic home sizes with permissions
|
||||||
int maxHomes = user.getPermissionValue("island.maxhomes", getIWM().getMaxHomes(getWorld()));
|
int maxHomes = user.getPermissionValue(getPermissionPrefix() + "island.maxhomes", getIWM().getMaxHomes(getWorld()));
|
||||||
if (maxHomes > 1) {
|
if (maxHomes > 1) {
|
||||||
// Check the number given is a number
|
// Check the number given is a number
|
||||||
int number;
|
int number;
|
||||||
|
Loading…
Reference in New Issue
Block a user