private void registerListener(Listener listener) { listeners.add(listener); ProxyServer.getInstance().getPluginManager().registerListener(plugin, listener); }
public OnlineForwardPluginMessagingForwardingSource(String channel, NuVotifier nuVotifier, ServerFilter serverFilter, VoteCache cache, String fallbackServer, int dumpRate) { super(channel, serverFilter, nuVotifier, cache, dumpRate); this.fallbackServer = fallbackServer; ProxyServer.getInstance().getPluginManager().registerListener(nuVotifier, this); }
public PluginMessagingForwardingSource(String channel, ServerFilter serverFilter, NuVotifier nuVotifier, VoteCache cache, int dumpRate) { super(channel, serverFilter, nuVotifier, cache, dumpRate); ProxyServer.getInstance().getPluginManager().registerListener(nuVotifier, this); }
protected PluginMessagingForwardingSource(String channel, NuVotifier nuVotifier, VoteCache voteCache, int dumpRate) { super(channel, nuVotifier, voteCache, dumpRate); ProxyServer.getInstance().getPluginManager().registerListener(nuVotifier, this); }
public void enable() { plugin.getProxy().getPluginManager().registerListener(plugin, this); }
private void registerListeners() { getProxy().getPluginManager().registerListener(this, new LobbyJoin()); getProxy().getPluginManager().registerListener(this, new ServerKick()); getProxy().getPluginManager().registerListener(this, new ProxyPing()); getProxy().getPluginManager().registerListener(this, new EventMonitor()); getProxy().getPluginManager().registerListener(this, new IpInjector()); }
public void onEnable() { handler = new ConsoleMessageHandler(this); getProxy().getPluginManager().registerListener(this, handler); }
public BungeeCommandManager(Plugin plugin) { this.plugin = plugin; this.formatters.put(MessageType.ERROR, defaultFormatter = new BungeeMessageFormatter(ChatColor.RED, ChatColor.YELLOW, ChatColor.RED)); this.formatters.put(MessageType.SYNTAX, new BungeeMessageFormatter(ChatColor.YELLOW, ChatColor.GREEN, ChatColor.WHITE)); this.formatters.put(MessageType.INFO, new BungeeMessageFormatter(ChatColor.BLUE, ChatColor.DARK_GREEN, ChatColor.GREEN)); this.formatters.put(MessageType.HELP, new BungeeMessageFormatter(ChatColor.AQUA, ChatColor.GREEN, ChatColor.YELLOW)); getLocales(); // auto load locales plugin.getProxy().getPluginManager().registerListener(plugin, new ACFBungeeListener(this, plugin)); //BungeeCord has no event for listening for client setting changes plugin.getProxy().getScheduler().schedule(plugin, () -> { ProxyServer.getInstance().getPlayers().forEach(this::readLocale); }, 5, 5, TimeUnit.SECONDS); // TODO more default dependencies for bungee registerDependency(plugin.getClass(), plugin); registerDependency(Plugin.class, plugin); }
@Override public void onEnable() { instance = this; Universal.get().setup(new BungeeMethods()); ProxyServer.getInstance().getPluginManager().registerListener(this, new ConnectionListenerBungee()); ProxyServer.getInstance().getPluginManager().registerListener(this, new ChatListenerBungee()); ProxyServer.getInstance().getPluginManager().registerListener(this, new InternalListener()); ProxyServer.getInstance().registerChannel("AdvancedBan"); if (ProxyServer.getInstance().getPluginManager().getPlugin("RedisBungee") != null) { Universal.get().useRedis(true); ProxyServer.getInstance().getPluginManager().registerListener(this, new PubSubMessageListener()); RedisBungee.getApi().registerPubSubChannels("AdvancedBan", "AdvancedBanConnection"); Universal.get().log("RedisBungee detected, hooking into it!"); } }
ProxyServer.getInstance().getPluginManager().registerListener(plugin, listener); plugin.getProxy().getScheduler().runAsync(plugin, resendThread); restartRefreshThread();
@Override public void onEnable() { logger = CommonUtil.createLoggerFromJDK(getLogger()); core = new ChangeSkinCore(this); try { core.load(true); } catch (Exception ioExc) { logger.error("Error initializing plugin. Disabling...", ioExc); return; } PluginManager pluginManager = getProxy().getPluginManager(); pluginManager.registerListener(this, new ConnectListener(this)); pluginManager.registerListener(this, new ServerSwitchListener(this)); //this is required to listen to incoming messages from the server getProxy().registerChannel(new NamespaceKey(getName(), PERMISSION_RESULT_CHANNEL).getCombinedName()); getProxy().registerChannel(new NamespaceKey(getName(), FORWARD_COMMAND_CHANNEL).getCombinedName()); pluginManager.registerListener(this, new PluginMessageListener(this)); //register commands pluginManager.registerCommand(this, new SetCommand(this)); pluginManager.registerCommand(this, new InvalidateCommand(this)); pluginManager.registerCommand(this, new UploadCommand(this)); pluginManager.registerCommand(this, new SelectCommand(this)); pluginManager.registerCommand(this, new InfoCommand(this)); }
public RedisPlayerManager(ConnectedPlayerManager connectedPlayerManager, BungeeTabListPlus plugin, Logger logger) { this.connectedPlayerManager = connectedPlayerManager; this.plugin = plugin; this.logger = logger; RedisBungee.getApi().registerPubSubChannels(CHANNEL_REQUEST_DATA_OLD, CHANNEL_DATA_OLD); RedisBungee.getApi().registerPubSubChannels(CHANNEL_DATA_REQUEST, CHANNEL_DATA_UPDATE); ProxyServer.getInstance().getScheduler().schedule(BungeeTabListPlus.getInstance().getPlugin(), this::updatePlayers, 1, 1, TimeUnit.SECONDS); ProxyServer.getInstance().getPluginManager().registerListener(BungeeTabListPlus.getInstance().getPlugin(), this); }
public BukkitBridge(@Nonnull BungeeTabListPlus plugin) { this.plugin = plugin; plugin.getProxy().getPluginManager().registerListener(plugin.getPlugin(), this); plugin.getProxy().getScheduler().schedule(plugin.getPlugin(), () -> plugin.runInMainThread(this::checkForThirdPartyVariables), 2, 2, TimeUnit.SECONDS); plugin.getProxy().getScheduler().schedule(plugin.getPlugin(), this::sendIntroducePackets, 100, 100, TimeUnit.MILLISECONDS); plugin.getProxy().getScheduler().schedule(plugin.getPlugin(), this::resendUnconfirmedMessages, 2, 2, TimeUnit.SECONDS); plugin.getProxy().getScheduler().schedule(plugin.getPlugin(), this::removeObsoleteServerConnections, 5, 5, TimeUnit.SECONDS); }
getLogger().log(Level.SEVERE, "Can't check for updates", e); getProxy().getPluginManager().registerListener(this, check); getProxy().getPluginManager().registerListener(this, new BuycraftListener(this));
getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.DebugCommand(this)); api = new RedisBungeeAPI(this); getProxy().getPluginManager().registerListener(this, new RedisBungeeListener(this, configuration.getExemptAddresses())); getProxy().getPluginManager().registerListener(this, dataManager); psl = new PubSubListener(); getProxy().getScheduler().runAsync(this, psl);
getProxy().getPluginManager().registerListener(this, new ProxiedListener());