MineLittlePony/src/main/java/com/brohoof/minelittlepony/MineLittlePony.java

42 lines
959 B
Java
Raw Normal View History

2015-11-17 06:09:04 +01:00
package com.brohoof.minelittlepony;
2015-08-02 00:36:33 +02:00
import net.minecraft.client.Minecraft;
2016-01-26 09:16:11 +01:00
public class MineLittlePony {
private static MineLittlePony instance;
2015-08-02 00:36:33 +02:00
private PonyConfig config;
private PonyManager ponyManager;
2015-11-17 06:19:58 +01:00
private ProxyContainer proxy;
2015-08-02 00:36:33 +02:00
2016-01-26 09:16:11 +01:00
private MineLittlePony() {
2015-08-02 00:36:33 +02:00
this.config = new PonyConfig();
this.ponyManager = new PonyManager(config);
2015-11-17 06:19:58 +01:00
this.proxy = new ProxyContainer();
2015-08-02 00:36:33 +02:00
}
2016-01-26 09:16:11 +01:00
public static MineLittlePony getInstance() {
if (instance == null)
instance = new MineLittlePony();
return instance;
2015-08-02 00:36:33 +02:00
}
public PonyManager getManager() {
return this.ponyManager;
}
2015-11-17 06:19:58 +01:00
public static ProxyContainer getProxy() {
return getInstance().proxy;
}
public static PonyConfig getConfig() {
2015-08-02 00:36:33 +02:00
return getInstance().config;
}
public static String getSPUsername() {
return Minecraft.getMinecraft().getSession().getUsername();
2015-08-02 00:36:33 +02:00
}
}