Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-10-08 10:50:11 +02:00
Return COLOR_0 for null values in MapColor
Might be better to eventually figure out why this is null to begin with, but for the time being considering maps are not working, we'd have to get to that step first. This just prevents the console from spamming errors, and will do until maps are fully implemented/fixed.
Dieser Commit ist enthalten in:
Ursprung
b15d37a4c5
Commit
dbe2a9b3b0
@ -227,7 +227,7 @@ public enum MapColor {
|
||||
}
|
||||
|
||||
public static MapColor fromId(int id) {
|
||||
return Arrays.stream(values()).filter(color -> color.getId() == id).findFirst().get();
|
||||
return Arrays.stream(values()).filter(color -> color.getId() == id).findFirst().orElse(COLOR_0);
|
||||
}
|
||||
|
||||
public int toARGB() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren