diff --git a/src/main/java/us/myles/ViaVersion/api/ViaVersion.java b/src/main/java/us/myles/ViaVersion/api/ViaVersion.java index 71cd5a5c5..07dbf8e5e 100644 --- a/src/main/java/us/myles/ViaVersion/api/ViaVersion.java +++ b/src/main/java/us/myles/ViaVersion/api/ViaVersion.java @@ -1,6 +1,7 @@ package us.myles.ViaVersion.api; import lombok.Getter; +import org.apache.commons.lang.Validate; import us.myles.ViaVersion.ViaVersionPlugin; public class ViaVersion { @@ -11,6 +12,7 @@ public class ViaVersion { private static ViaVersionConfig config; public static void setInstance(ViaVersionPlugin plugin) { + Validate.isTrue(instance == null, "Instance is already set"); ViaVersion.instance = plugin; ViaVersion.config = plugin; }