mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -910,14 +910,14 @@ public class EssentialsPlayerListener implements Listener {
|
||||||
/**
|
/**
|
||||||
* Returns true if all of the following are true:
|
* Returns true if all of the following are true:
|
||||||
* - The command is a plugin command
|
* - 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
|
* - There is no known alternative OR the alternative is overridden by Essentials
|
||||||
*/
|
*/
|
||||||
private boolean isEssentialsCommand(String label) {
|
private boolean isEssentialsCommand(String label) {
|
||||||
PluginCommand command = ess.getServer().getPluginCommand(label);
|
PluginCommand command = ess.getServer().getPluginCommand(label);
|
||||||
|
|
||||||
return command != null
|
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));
|
&& (ess.getSettings().isCommandOverridden(label) || (ess.getAlternativeCommandsHandler().getAlternative(label) == null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue