[Bleeding] Fix getCommand for conflicting plugin commands.

By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
Bukkit/Spigot
2014-02-09 12:27:08 -05:00
parent 2c68d4b554
commit aecd846814
2 changed files with 4 additions and 4 deletions

View File

@@ -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;