Merge pull request #313 from Matsv/master

Stop allowing everyone to change the instance
This commit is contained in:
Myles 2016-04-02 21:32:46 +01:00
commit 8276b212e9

View File

@ -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;
}