File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/main/java/world/bentobox/level/commands Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 44
55import world .bentobox .bentobox .api .commands .CompositeCommand ;
66import world .bentobox .bentobox .api .user .User ;
7+ import world .bentobox .bentobox .database .objects .Island ;
78import world .bentobox .level .Level ;
89import world .bentobox .level .panels .DetailsPanel ;
910
@@ -26,11 +27,13 @@ public void setup() {
2627
2728 @ Override
2829 public boolean execute (User user , String label , List <String > list ) {
29- if (getIslands ().hasIsland (getWorld (), user )) {
30- DetailsPanel .openPanel (this .addon , getWorld (), user );
31- } else {
32- user .sendMessage ("general.errors.no-island" );
30+ Island island = getIslands ().getIsland (getWorld (), user );
31+ if (island == null ) {
32+ user .sendMessage ("general.errors.player-has-no-island" );
33+ return false ;
34+
3335 }
36+ DetailsPanel .openPanel (this .addon , getWorld (), user );
3437 return true ;
3538 }
3639}
You can’t perform that action at this time.
0 commit comments