mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
[Bleeding] Fix getCommand for conflicting plugin commands.
By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
@@ -351,11 +351,11 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
String alias = name.toLowerCase();
|
||||
PluginCommand command = getServer().getPluginCommand(alias);
|
||||
|
||||
if ((command != null) && (command.getPlugin() != this)) {
|
||||
if (command == null || command.getPlugin() != this) {
|
||||
command = getServer().getPluginCommand(description.getName().toLowerCase() + ":" + alias);
|
||||
}
|
||||
|
||||
if ((command != null) && (command.getPlugin() == this)) {
|
||||
if (command != null && command.getPlugin() == this) {
|
||||
return command;
|
||||
} else {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user