77import me .croabeast .common .Registrable ;
88import org .apache .commons .lang .StringUtils ;
99import org .bukkit .Bukkit ;
10- import org .bukkit .NamespacedKey ;
1110import org .bukkit .Server ;
1211import org .bukkit .command .CommandSender ;
1312import org .bukkit .command .PluginIdentifiableCommand ;
3130 * <p>
3231 * Key features include:
3332 * <ul>
34- * <li>Generating a unique {@link NamespacedKey} for each command.</li>
33+ * <li>Generating a unique runtime key for each command instance .</li>
3534 * <li>Managing sub-commands through an internal set.</li>
3635 * <li>Customizable error handling via {@code executingError} and {@code completingError} predicates.</li>
3736 * <li>Dynamic addition and removal of aliases.</li>
@@ -50,7 +49,7 @@ public abstract class BukkitCommand extends org.bukkit.command.defaults.BukkitCo
5049 /**
5150 * The unique key associated with this command.
5251 */
53- private final NamespacedKey key ;
52+ private final String key ;
5453
5554 /**
5655 * The plugin that owns this command.
@@ -252,7 +251,7 @@ public BukkitCommand(Plugin plugin, String name, String permission) {
252251 super (name );
253252 this .plugin = Objects .requireNonNull (plugin );
254253
255- key = new NamespacedKey (plugin , UUID .randomUUID (). toString () );
254+ key = Entry . pluginName (plugin ) + ':' + UUID .randomUUID ();
256255 setPermission (permission );
257256
258257 subCommandMap = SubCommandMap .create ();
0 commit comments