Search in sources :

Example 1 with BungeeEntityIdProvider

use of com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider in project ViaVersion by ViaVersion.

the class BungeeViaLoader method load.

@Override
public void load() {
    // Listeners
    registerListener(plugin);
    registerListener(new UpdateListener());
    registerListener(new BungeeServerHandler());
    if (Via.getAPI().getServerVersion().lowestSupportedVersion() < ProtocolVersion.v1_9.getVersion()) {
        registerListener(new ElytraPatch());
    }
    // Providers
    Via.getManager().getProviders().use(VersionProvider.class, new BungeeVersionProvider());
    Via.getManager().getProviders().use(EntityIdProvider.class, new BungeeEntityIdProvider());
    if (Via.getAPI().getServerVersion().lowestSupportedVersion() < ProtocolVersion.v1_9.getVersion()) {
        Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
        Via.getManager().getProviders().use(BossBarProvider.class, new BungeeBossBarProvider());
        Via.getManager().getProviders().use(MainHandProvider.class, new BungeeMainHandProvider());
    }
    if (plugin.getConf().getBungeePingInterval() > 0) {
        tasks.add(plugin.getProxy().getScheduler().schedule(plugin, new ProtocolDetectorService(plugin), 0, plugin.getConf().getBungeePingInterval(), TimeUnit.SECONDS));
    }
}
Also used : ProtocolDetectorService(com.viaversion.viaversion.bungee.service.ProtocolDetectorService) BungeeMovementTransmitter(com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter) ElytraPatch(com.viaversion.viaversion.bungee.listeners.ElytraPatch) BungeeVersionProvider(com.viaversion.viaversion.bungee.providers.BungeeVersionProvider) UpdateListener(com.viaversion.viaversion.bungee.listeners.UpdateListener) BungeeBossBarProvider(com.viaversion.viaversion.bungee.providers.BungeeBossBarProvider) BungeeServerHandler(com.viaversion.viaversion.bungee.handlers.BungeeServerHandler) BungeeEntityIdProvider(com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider) BungeeMainHandProvider(com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider)

Aggregations

BungeeServerHandler (com.viaversion.viaversion.bungee.handlers.BungeeServerHandler)1 ElytraPatch (com.viaversion.viaversion.bungee.listeners.ElytraPatch)1 UpdateListener (com.viaversion.viaversion.bungee.listeners.UpdateListener)1 BungeeBossBarProvider (com.viaversion.viaversion.bungee.providers.BungeeBossBarProvider)1 BungeeEntityIdProvider (com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider)1 BungeeMainHandProvider (com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider)1 BungeeMovementTransmitter (com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter)1 BungeeVersionProvider (com.viaversion.viaversion.bungee.providers.BungeeVersionProvider)1 ProtocolDetectorService (com.viaversion.viaversion.bungee.service.ProtocolDetectorService)1