9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-29 11:49:07 +00:00

Add sake mechanics server type

This commit is contained in:
Samsuik
2025-10-26 00:14:37 +01:00
parent 3599c33266
commit b1d4b83615
11 changed files with 264 additions and 48 deletions

View File

@@ -76,6 +76,7 @@ public record MinecraftMechanicsTarget(short mechanicVersion, byte serverType) {
final byte serverType = switch (serverPart.toLowerCase(Locale.ENGLISH)) {
case "vanilla" -> ServerType.VANILLA;
case "spigot" -> ServerType.SPIGOT;
case "sake" -> ServerType.SAKE;
default -> ServerType.PAPER;
};

View File

@@ -10,12 +10,14 @@ public final class ServerType {
public static final byte VANILLA = 0;
public static final byte SPIGOT = 1;
public static final byte PAPER = 2;
public static final byte SAKE = 32;
public static String name(final byte serverType) {
return switch (serverType) {
case 0 -> "vanilla";
case 1 -> "spigot";
case 2 -> "paper";
case 33 -> "sake";
default -> "unknown";
};
}