Check plugin equals rather than name equals in autocomplete listener

This commit is contained in:
md678685 2019-08-01 14:57:48 +01:00
parent 1ff73b3837
commit 119b21ac67

View File

@ -867,7 +867,7 @@ public class EssentialsPlayerListener implements Listener {
PluginCommand command = ess.getServer().getPluginCommand(commandLabel);
return command != null
&& command.getPlugin().getName().equals("Essentials")
&& command.getPlugin() == ess
&& (ess.getSettings().isCommandOverridden(commandLabel) || (ess.getAlternativeCommandsHandler().getAlternative(commandLabel) == null))
&& !user.isAuthorized(command.getName().equals("r") ? "essentials.msg" : "essentials." + command.getName());
}