From 7acc8d54012a38e72fae1d828006280a63db630a Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Wed, 3 Jan 2018 21:15:01 +0100 Subject: [PATCH] Minor changes in CompositeCommand Notably improved the #isPlayer(user) condition --- .../tastybento/bskyblock/api/commands/CompositeCommand.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java b/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java index d78ca4bcb..c92e1e90c 100644 --- a/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java +++ b/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java @@ -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