From 808876f2f88512eee7f4e0b724fd9095fa8c4210 Mon Sep 17 00:00:00 2001 From: Aust1n46 Date: Thu, 26 Aug 2021 23:29:25 -0400 Subject: [PATCH] Uplift to Velocity 3.0.0 --- pom.xml | 2 +- .../Aust1n46/chat/bungee/VentureChatVelocity.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) 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