mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
remove VersionUtil bloat
This commit is contained in:
parent
ca55f06853
commit
bb463dae7e
@ -139,10 +139,7 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
logger.error("Terra does not work on version 1.16.5 at the moment.");
|
||||
|
||||
if(!VersionUtil.getSpigotVersionInfo().isSpigot())
|
||||
logger.error("YOU ARE RUNNING A CRAFTBUKKIT OR BUKKIT SERVER JAR. PLEASE UPGRADE TO PAPER SPIGOT.");
|
||||
|
||||
if(VersionUtil.getSpigotVersionInfo().isYatopia())
|
||||
logger.warn("Yatopia is a highly unstable fork of spigot. You may experience various issues with it.");
|
||||
logger.error("YOU ARE RUNNING A CRAFTBUKKIT OR BUKKIT SERVER JAR. PLEASE UPGRADE TO PAPER.");
|
||||
|
||||
if(VersionUtil.getSpigotVersionInfo().isMohist()) {
|
||||
if(System.getProperty("IKnowMohistCausesLotsOfIssuesButIWillUseItAnyways") == null) {
|
||||
|
@ -40,10 +40,6 @@ public final class VersionUtil {
|
||||
private final boolean spigot;
|
||||
private final boolean paper;
|
||||
private final boolean mohist;
|
||||
private final boolean airplane;
|
||||
private final boolean tuinity;
|
||||
private final boolean purpur;
|
||||
private final boolean yatopia;
|
||||
|
||||
|
||||
public SpigotVersionInfo() {
|
||||
@ -52,33 +48,6 @@ public final class VersionUtil {
|
||||
paper = PaperLib.isPaper();
|
||||
spigot = PaperLib.isSpigot();
|
||||
|
||||
boolean isTuinity = false;
|
||||
try {
|
||||
Class.forName("com.tuinity.tuinity.config.TuinityConfig");
|
||||
isTuinity = true;
|
||||
} catch(ClassNotFoundException ignored) { }
|
||||
this.tuinity = isTuinity;
|
||||
|
||||
boolean isAirplane = false;
|
||||
try {
|
||||
Class.forName("gg.airplane.AirplaneConfig");
|
||||
isAirplane = true;
|
||||
} catch(ClassNotFoundException ignored) { }
|
||||
this.airplane = isAirplane;
|
||||
|
||||
boolean isPurpur = false;
|
||||
try {
|
||||
Class.forName("net.pl3x.purpur.PurpurConfig");
|
||||
isPurpur = true;
|
||||
} catch(ClassNotFoundException ignored) { }
|
||||
this.purpur = isPurpur;
|
||||
|
||||
boolean isYatopia = false;
|
||||
try {
|
||||
Class.forName("org.yatopiamc.yatopia.server.YatopiaConfig");
|
||||
isYatopia = true;
|
||||
} catch(ClassNotFoundException ignored) { }
|
||||
this.yatopia = isYatopia;
|
||||
|
||||
boolean isMohist = false;
|
||||
try {
|
||||
@ -95,14 +64,6 @@ public final class VersionUtil {
|
||||
public String toString() {
|
||||
if(mohist)
|
||||
return "Mohist...";
|
||||
else if(yatopia)
|
||||
return "Yaptopia";
|
||||
else if(purpur)
|
||||
return "Purpur";
|
||||
else if(tuinity)
|
||||
return "Tuinity";
|
||||
else if(airplane)
|
||||
return "Airplane";
|
||||
else if(paper)
|
||||
return "Paper";
|
||||
else if(spigot)
|
||||
@ -111,10 +72,6 @@ public final class VersionUtil {
|
||||
return "Craftbukkit";
|
||||
}
|
||||
|
||||
public boolean isAirplane() {
|
||||
return airplane;
|
||||
}
|
||||
|
||||
public boolean isPaper() {
|
||||
return paper;
|
||||
}
|
||||
@ -123,21 +80,9 @@ public final class VersionUtil {
|
||||
return mohist;
|
||||
}
|
||||
|
||||
public boolean isPurpur() {
|
||||
return purpur;
|
||||
}
|
||||
|
||||
public boolean isSpigot() {
|
||||
return spigot;
|
||||
}
|
||||
|
||||
public boolean isTuinity() {
|
||||
return tuinity;
|
||||
}
|
||||
|
||||
public boolean isYatopia() {
|
||||
return yatopia;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user