2018-09-24 21:37:50 +02:00
|
|
|
package com.minelittlepony.unicopia;
|
|
|
|
|
|
|
|
import com.minelittlepony.MineLittlePony;
|
2019-02-01 21:28:28 +01:00
|
|
|
import com.minelittlepony.pony.data.PonyRace;
|
2018-09-24 21:37:50 +02:00
|
|
|
|
|
|
|
public final class MineLP {
|
|
|
|
private static boolean checkComplete;
|
|
|
|
private static boolean modIsActive;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if mine little pony is present. That's all we need.
|
|
|
|
*/
|
|
|
|
public static boolean modIsActive() {
|
|
|
|
if (!checkComplete) {
|
|
|
|
try {
|
2019-01-08 09:34:05 +01:00
|
|
|
MineLittlePony.getInstance();
|
2019-02-01 21:28:28 +01:00
|
|
|
|
|
|
|
// always true, but this will throw if we don't have what we need.
|
|
|
|
modIsActive = PonyRace.HUMAN.isHuman();
|
2018-09-24 21:37:50 +02:00
|
|
|
} catch (Exception e) {
|
|
|
|
modIsActive = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return modIsActive;
|
|
|
|
}
|
|
|
|
}
|