mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-01 07:03:26 +01:00
Fixed bug with island command and island go
This commit is contained in:
parent
007a9af025
commit
4bf0d8ec0f
@ -67,7 +67,8 @@ public class IslandCommand extends CompositeCommand {
|
|||||||
}
|
}
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
// If in world, go
|
// If in world, go
|
||||||
if (getPlugin().getIslands().hasIsland(getWorld(), user.getUniqueId())) {
|
|
||||||
|
if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) {
|
||||||
return getSubCommand("go").map(goCmd -> goCmd.execute(user, new ArrayList<>())).orElse(false);
|
return getSubCommand("go").map(goCmd -> goCmd.execute(user, new ArrayList<>())).orElse(false);
|
||||||
}
|
}
|
||||||
// No islands currently
|
// No islands currently
|
||||||
|
@ -38,7 +38,7 @@ public class IslandGoCommand extends CompositeCommand {
|
|||||||
@Override
|
@Override
|
||||||
public boolean execute(User user, List<String> args) {
|
public boolean execute(User user, List<String> args) {
|
||||||
|
|
||||||
if (!getIslands().hasIsland(getWorld(), user.getUniqueId())) {
|
if (getIslands().getIsland(getWorld(), user.getUniqueId()) == null) {
|
||||||
user.sendMessage(ChatColor.RED + "general.errors.no-island");
|
user.sendMessage(ChatColor.RED + "general.errors.no-island");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user