Load bukkit connection listener earlier

This commit is contained in:
Vankka 2022-03-04 14:01:01 +02:00
parent f8c5578cb3
commit 62b3f0b8b3
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -172,14 +172,14 @@ public class BukkitDiscordSRV extends ServerDiscordSRV<BukkitConfig, BukkitConne
// Service provider
server().getServicesManager().register(DiscordSRVApi.class, this, plugin(), ServicePriority.Normal);
// Player related
// Adventure audiences, connection listener
this.audiences = BukkitAudiences.create(bootstrap.getPlugin());
server().getPluginManager().registerEvents(new BukkitConnectionListener(this), plugin());
super.enable();
// Register listeners
server().getPluginManager().registerEvents(BukkitChatListener.get(this), plugin());
server().getPluginManager().registerEvents(new BukkitConnectionListener(this), plugin());
server().getPluginManager().registerEvents(new BukkitDeathListener(this), plugin());
server().getPluginManager().registerEvents(new BukkitStatusMessageListener(this), plugin());