mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2024-11-26 12:15:14 +01:00
Switch to using call instead of execute to enable perms to be used
https://github.com/BentoBoxWorld/BentoBox/issues/759
This commit is contained in:
parent
fdd4bc795b
commit
20e4786f08
@ -64,10 +64,10 @@ public class IslandCommand extends CompositeCommand {
|
|||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
// If user has an island, go
|
// If user has an island, go
|
||||||
if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) {
|
if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) {
|
||||||
return getSubCommand("go").map(goCmd -> goCmd.execute(user, goCmd.getLabel(), new ArrayList<>())).orElse(false);
|
return getSubCommand("go").map(goCmd -> goCmd.call(user, goCmd.getLabel(), new ArrayList<>())).orElse(false);
|
||||||
}
|
}
|
||||||
// No islands currently
|
// No islands currently
|
||||||
return getSubCommand("create").map(createCmd -> createCmd.execute(user, createCmd.getLabel(), new ArrayList<>())).orElse(false);
|
return getSubCommand("create").map(createCmd -> createCmd.call(user, createCmd.getLabel(), new ArrayList<>())).orElse(false);
|
||||||
}
|
}
|
||||||
user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
|
user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user