Clean up some Bukkit code
This commit is contained in:
parent
62abfa5e95
commit
a8d3fa7c5e
7 changed files with 82 additions and 6 deletions
|
|
@ -35,7 +35,7 @@ import java.lang.reflect.Method;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class BukkitPluginRegistrationHandler implements CommandRegistrationHandler {
|
||||
final class BukkitPluginRegistrationHandler implements CommandRegistrationHandler {
|
||||
|
||||
private final Map<CommandComponent<?, ?>, org.bukkit.command.Command> registeredCommands = new HashMap<>();
|
||||
|
||||
|
|
@ -71,8 +71,10 @@ public class BukkitPluginRegistrationHandler implements CommandRegistrationHandl
|
|||
} else {
|
||||
label = commandComponent.getName();
|
||||
}
|
||||
this.bukkitCommands.put(label, new BukkitCommand((CommandComponent<BukkitCommandSender, ?>) commandComponent,
|
||||
this.bukkitCommandManager));
|
||||
final BukkitCommand bukkitCommand = new BukkitCommand((CommandComponent<BukkitCommandSender, ?>) commandComponent,
|
||||
this.bukkitCommandManager);
|
||||
this.bukkitCommands.put(label, bukkitCommand);
|
||||
this.registeredCommands.put(commandComponent, bukkitCommand);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue