From 1d722c74862a61fc586cb8360576ab0f8724508d Mon Sep 17 00:00:00 2001 From: Kas-tle <26531652+Kas-tle@users.noreply.github.com> Date: Wed, 8 May 2024 07:18:41 -0700 Subject: [PATCH] Only attempt pack application on first server join --- .../main/java/net/paradisu/velocity/pack/PackListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/velocity/src/main/java/net/paradisu/velocity/pack/PackListener.java b/velocity/src/main/java/net/paradisu/velocity/pack/PackListener.java index 5dd5a89..f1fc502 100644 --- a/velocity/src/main/java/net/paradisu/velocity/pack/PackListener.java +++ b/velocity/src/main/java/net/paradisu/velocity/pack/PackListener.java @@ -23,6 +23,10 @@ public class PackListener { */ @Subscribe(order = PostOrder.EARLY) public void onPostConnect(ServerPostConnectEvent event) { + // TODO: Track per-player pack state + // For now, we can just assume they will not have any packs applied if they just joined the proxy + if (event.getPreviousServer() != null) return; + final Player player = event.getPlayer(); final Optional serverConnection = player.getCurrentServer();