Search in sources :

Example 1 with Messenger

use of org.bukkit.plugin.messaging.Messenger in project AuthMeReloaded by AuthMe.

the class BungeeService method reload.

@Override
public void reload(Settings settings) {
    this.isEnabled = settings.getProperty(HooksSettings.BUNGEECORD);
    this.bungeeServer = settings.getProperty(HooksSettings.BUNGEECORD_SERVER);
    Messenger messenger = plugin.getServer().getMessenger();
    if (!this.isEnabled) {
        return;
    }
    if (!messenger.isOutgoingChannelRegistered(plugin, "BungeeCord")) {
        messenger.registerOutgoingPluginChannel(plugin, "BungeeCord");
    }
}
Also used : Messenger(org.bukkit.plugin.messaging.Messenger)

Example 2 with Messenger

use of org.bukkit.plugin.messaging.Messenger in project AuthMeReloaded by AuthMe.

the class BungeeSender method reload.

@Override
public void reload(final Settings settings) {
    this.isEnabled = settings.getProperty(HooksSettings.BUNGEECORD);
    this.destinationServerOnLogin = settings.getProperty(HooksSettings.BUNGEECORD_SERVER);
    if (this.isEnabled) {
        final Messenger messenger = plugin.getServer().getMessenger();
        if (!messenger.isOutgoingChannelRegistered(plugin, "BungeeCord")) {
            messenger.registerOutgoingPluginChannel(plugin, "BungeeCord");
        }
    }
}
Also used : Messenger(org.bukkit.plugin.messaging.Messenger)

Aggregations

Messenger (org.bukkit.plugin.messaging.Messenger)2