add tacospigot detection

This commit is contained in:
jascotty2 2019-09-05 09:04:50 -05:00
parent 0ea798549f
commit 280d4134f7

View File

@ -5,7 +5,7 @@ import org.bukkit.Bukkit;
public enum ServerProject {
UNKNOWN, CRAFTBUKKIT, SPIGOT, PAPER, GLOWSTONE;
UNKNOWN, CRAFTBUKKIT, SPIGOT, PAPER, TACO, GLOWSTONE;
private static ServerProject serverProject = checkProject();
private static ServerProject checkProject() {
@ -13,6 +13,12 @@ public enum ServerProject {
if (serverPath.contains("glowstone")) {
return GLOWSTONE;
}
// taco is pretty easy to check. it uses paper stuff, though, so should be checked first
try {
Class.forName("net.techcable.tacospigot.TacoSpigotConfig");
return TACO;
} catch (ClassNotFoundException ex) {
}
// paper used to be called "paperclip"
try {
Class.forName("com.destroystokyo.paperclip.Paperclip");
@ -24,6 +30,7 @@ public enum ServerProject {
return PAPER;
} catch (ClassNotFoundException ex) {
}
// spigot is the fork that pretty much all builds are based on anymore
try {
Class.forName("org.spigotmc.SpigotConfig");
return SPIGOT;