Use plugin name, for command fallback.

This commit is contained in:
Magnus Ulf 2015-03-22 15:55:36 +01:00 committed by Olof Larsson
parent 1e13613492
commit 30f07c92a9

View File

@ -109,7 +109,9 @@ public class MassiveCoreEngineCommandRegistration extends EngineAbstract
MassiveCoreBukkitCommand command = new MassiveCoreBukkitCommand(name, target); MassiveCoreBukkitCommand command = new MassiveCoreBukkitCommand(name, target);
// ... and finally register it. // ... and finally register it.
simpleCommandMap.register("MassiveCore", command); Plugin plugin = massiveCurrent.getRegisteredPlugin();
String pluginName = plugin != null ? plugin.getName() : "MassiveCore";
simpleCommandMap.register(pluginName, command);
} }
// Step #4: Remove/Unregister MassiveCommands from Bukkit that are but should not be that any longer. // Step #4: Remove/Unregister MassiveCommands from Bukkit that are but should not be that any longer.