Fix crash reported in #24.

GUI will be opened only if caller is player.
This commit is contained in:
BONNe 2018-12-18 00:41:56 +02:00
parent 76a65c392f
commit c40c9c4044

View File

@ -17,7 +17,9 @@ public class IslandTop extends CompositeCommand {
@Override
public boolean execute(User user, String label, List<String> list) {
plugin.getTopTen().getGUI(getWorld(), user, getPermissionPrefix());
if (user.isPlayer()) {
this.plugin.getTopTen().getGUI(getWorld(), user, getPermissionPrefix());
}
return true;
}