From c570f4a9725ff1e47f9fbc82b9317234853bac87 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Wed, 25 Mar 2020 18:36:06 +0100 Subject: [PATCH] Minor change --- common/src/main/java/us/myles/ViaVersion/ViaManager.java | 4 +--- .../us/myles/ViaVersion/api/protocol/ProtocolRegistry.java | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/ViaManager.java b/common/src/main/java/us/myles/ViaVersion/ViaManager.java index 2d0d00c2a..d3d9fde44 100644 --- a/common/src/main/java/us/myles/ViaVersion/ViaManager.java +++ b/common/src/main/java/us/myles/ViaVersion/ViaManager.java @@ -1,8 +1,6 @@ package us.myles.ViaVersion; import lombok.Builder; -import lombok.Getter; -import lombok.Setter; import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.platform.ViaInjector; @@ -48,7 +46,7 @@ public class ViaManager { if (platform.getConf().isCheckForUpdates()) UpdateUtil.sendUpdateMessage(); // Force class load - ProtocolRegistry.getSupportedVersions(); + ProtocolRegistry.init(); // Inject try { injector.inject(); diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java index d4ae5e12e..a3421b17e 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java @@ -88,6 +88,10 @@ public class ProtocolRegistry { registerProtocol(new Protocol1_16To1_15_2(), ProtocolVersion.v1_16, ProtocolVersion.v1_15_2); } + public static void init() { + // Empty method to trigger static initializer once + } + /** * Register a protocol *