@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandList() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandFind() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandServer() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandAlert() ); getProxy().getPluginManager().registerCommand( this, new CommandAlertRaw() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandSend() ); } }
getPluginManager().registerCommand( null, new CommandReload() ); getPluginManager().registerCommand( null, new CommandEnd() ); getPluginManager().registerCommand( null, new CommandIP() ); getPluginManager().registerCommand( null, new CommandBungee() ); getPluginManager().registerCommand( null, new CommandPerms() );
@Override public void registerCommand(BaseCommand command) { command.onRegister(this); for (Map.Entry<String, RootCommand> entry : command.registeredCommands.entrySet()) { String commandName = entry.getKey().toLowerCase(); BungeeRootCommand bungeeCommand = (BungeeRootCommand) entry.getValue(); if (!bungeeCommand.isRegistered) { this.plugin.getProxy().getPluginManager().registerCommand(this.plugin, bungeeCommand); } bungeeCommand.isRegistered = true; registeredCommands.put(commandName, bungeeCommand); } }
private void registerCommands() { getProxy().getPluginManager().registerCommand(this, getTimoCloudCommand()); getProxy().getPluginManager().registerCommand(this, new GlistCommand()); getProxy().getPluginManager().registerCommand(this, new FindCommand()); List<String> lobbyCommands = getFileManager().getConfig().getStringList("lobbyCommands"); if (lobbyCommands.size() > 0) { String[] aliases = lobbyCommands.subList(1, lobbyCommands.size()).toArray(new String[0]); getProxy().getPluginManager().registerCommand(this, new LobbyCommand(lobbyCommands.get(0), aliases)); } }
public boolean registerAll(List<Command> registered) { for(Command command : registered) { CommandWrapper wrapper = new CommandWrapper(this.executor, command.aliases()[0], command.aliases()); this.pluginManager.registerCommand(this.plugin, wrapper); } return true; }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandList() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandFind() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandAlert() ); getProxy().getPluginManager().registerCommand( this, new CommandAlertRaw() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandServer() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand( this, new CommandSend() ); } }
@Override public void onEnable() { getProxy().getPluginManager().registerCommand(this, new SparkCommand()); }
@Override public void onEnable() { loadAndBind(); getProxy().getPluginManager().registerCommand(this, new Command("nvreload") { @Override public void execute(CommandSender sender, String[] args) { if (sender instanceof ProxiedPlayer) sender.sendMessage(ChatColor.RED + "For security and stability, only console may run this command!"); else reload(); } }); }
@Override public void setCommandExecutor(String cmd) { ProxyServer.getInstance().getPluginManager().registerCommand((Plugin) getPlugin(), new CommandReceiverBungee(cmd)); }
@Override public void onEnable() { // create a custom tab list customTablist = BungeeTabListPlusAPI.createCustomTablist(); // with 19 rows and 1 column customTablist.setSize(19); // if the player types /tabdemo he will see the custom tab list getProxy().getPluginManager().registerCommand(this, new Command("tabdemo") { @Override public void execute(CommandSender sender, String[] args) { if (sender instanceof ProxiedPlayer) { BungeeTabListPlusAPI.setCustomTabList(((ProxiedPlayer) sender), customTablist); } } }); // every second call updateCustomTablist to update the content of our custom tab list getProxy().getScheduler().schedule(this, this::updateCustomTablist, 1, 1, TimeUnit.SECONDS); // Create our icon. Use the default icon until the custom one is created. try { BufferedImage image = ImageIO.read(getResourceAsStream("icon.png")); BungeeTabListPlusAPI.createIcon(image, icon -> this.icon = icon); } catch (IOException ex) { getLogger().log(Level.SEVERE, "Failed to load icon.", ex); } }
@Override public void onLoad() { api = new BungeeViaAPI(); config = new BungeeViaConfig(getDataFolder()); commandHandler = new BungeeCommandHandler(); ProxyServer.getInstance().getPluginManager().registerCommand(this, new BungeeCommand(commandHandler)); // Init platform Via.init(ViaManager.builder() .platform(this) .injector(new BungeeViaInjector()) .loader(new BungeeViaLoader(this)) .commandHandler(commandHandler) .build()); }
@Override public void run() { if (CloudAPI.getInstance().getPermissionPool() != null && CloudAPI.getInstance().getPermissionPool().isAvailable()) getProxy().getPluginManager().registerCommand(ProxiedBootstrap.this, new CommandPermissions()); if (CloudProxy.getInstance().getProxyGroup() != null && CloudProxy.getInstance().getProxyGroup().getProxyConfig().getCustomPayloadFixer()) { getProxy().registerChannel("MC|BSign"); getProxy().registerChannel("MC|BEdit"); } } }, 1, TimeUnit.SECONDS);