mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-31 23:59:33 +01:00
Part 2/2 Import & register listener.
This commit is contained in:
parent
76296d8d41
commit
f6ae076731
@ -18,6 +18,7 @@ import us.myles.ViaVersion.bukkit.listeners.protocol1_9to1_8.*;
|
||||
import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
||||
import us.myles.ViaVersion.bukkit.providers.BukkitViaBulkChunkTranslator;
|
||||
import us.myles.ViaVersion.bukkit.providers.BukkitViaMovementTransmitter;
|
||||
import us.myles.ViaVersion.bukkit.classgenerator.ClassGenerator;
|
||||
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
||||
@ -57,6 +58,9 @@ public class BukkitViaLoader implements ViaPlatformLoader {
|
||||
/* Base Protocol */
|
||||
final ViaVersionPlugin plugin = (ViaVersionPlugin) Bukkit.getPluginManager().getPlugin("ViaVersion");
|
||||
|
||||
// Add ProtocolSupport ConnectListener if necessary.
|
||||
ClassGenerator.registerPSConnectListener(plugin);
|
||||
|
||||
registerListener(new Listener() {
|
||||
@EventHandler
|
||||
public void onPlayerQuit(PlayerQuitEvent e) {
|
||||
@ -128,4 +132,4 @@ public class BukkitViaLoader implements ViaPlatformLoader {
|
||||
}
|
||||
tasks.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user