diff --git a/pom.xml b/pom.xml index a252e8f..ec0bb04 100644 --- a/pom.xml +++ b/pom.xml @@ -177,7 +177,7 @@ com.velocitypowered velocity-api - 1.0.0-SNAPSHOT + 3.0.0-SNAPSHOT provided diff --git a/src/main/java/mineverse/Aust1n46/chat/bungee/VentureChatVelocity.java b/src/main/java/mineverse/Aust1n46/chat/bungee/VentureChatVelocity.java index 2f59c68..3a518ea 100644 --- a/src/main/java/mineverse/Aust1n46/chat/bungee/VentureChatVelocity.java +++ b/src/main/java/mineverse/Aust1n46/chat/bungee/VentureChatVelocity.java @@ -15,6 +15,7 @@ import com.velocitypowered.api.event.connection.DisconnectEvent; import com.velocitypowered.api.event.connection.PluginMessageEvent; import com.velocitypowered.api.event.connection.PluginMessageEvent.ForwardResult; import com.velocitypowered.api.event.player.ServerConnectedEvent; +import com.velocitypowered.api.event.player.ServerPostConnectEvent; import com.velocitypowered.api.event.proxy.ProxyInitializeEvent; import com.velocitypowered.api.plugin.Plugin; import com.velocitypowered.api.proxy.Player; @@ -41,12 +42,8 @@ public class VentureChatVelocity implements VentureChatProxySource { } @Subscribe - public void onPlayerJoin(ServerConnectedEvent event) { - proxyServer.getScheduler().buildTask(this, () -> { - updatePlayerNames(); - }) - .delay(500, TimeUnit.MILLISECONDS) - .schedule(); + public void onPlayerJoin(ServerPostConnectEvent event) { + updatePlayerNames(); } @Subscribe