mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-23 02:25:19 +01:00
Merge pull request #313 from Matsv/master
Stop allowing everyone to change the instance
This commit is contained in:
commit
8276b212e9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user