mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-10-03 17:17:32 +02:00
Minor changes in CompositeCommand
Notably improved the #isPlayer(user) condition
This commit is contained in:
parent
b8dcc98a0c
commit
7acc8d5401
@ -304,7 +304,6 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
this.usage = parent.getLabel() + " " + this.usage;
|
||||
parent = parent.getParent();
|
||||
}
|
||||
this.usage = this.usage;
|
||||
this.usage = this.usage.trim();
|
||||
return this;
|
||||
}
|
||||
@ -358,10 +357,9 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
* @return true if sender is a player
|
||||
*/
|
||||
protected boolean isPlayer(User user) {
|
||||
return (user.getPlayer() instanceof Player);
|
||||
return user.getPlayer() != null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set whether this command is only for players
|
||||
* @param onlyPlayer
|
||||
|
Loading…
Reference in New Issue
Block a user