mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-17 12:01:26 +01:00
add tacospigot detection
This commit is contained in:
parent
0ea798549f
commit
280d4134f7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user