mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-22 08:01:23 +01:00
Hide EssX commands from non-core modules in autocomplete (#3473)
quick little thing so people stop complaining
This commit is contained in:
parent
e35fb82bc2
commit
08e553bd1a
@ -910,14 +910,14 @@ public class EssentialsPlayerListener implements Listener {
|
||||
/**
|
||||
* Returns true if all of the following are true:
|
||||
* - The command is a plugin command
|
||||
* - The plugin command is from Essentials
|
||||
* - The plugin command is from a plugin in an essentials-controlled package
|
||||
* - There is no known alternative OR the alternative is overridden by Essentials
|
||||
*/
|
||||
private boolean isEssentialsCommand(String label) {
|
||||
PluginCommand command = ess.getServer().getPluginCommand(label);
|
||||
|
||||
return command != null
|
||||
&& command.getPlugin() == ess
|
||||
&& (command.getPlugin() == ess || command.getPlugin().getClass().getName().startsWith("com.earth2me.essentials"))
|
||||
&& (ess.getSettings().isCommandOverridden(label) || (ess.getAlternativeCommandsHandler().getAlternative(label) == null));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user