mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00: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.
This commit is contained in:
parent
b15d37a4c5
commit
dbe2a9b3b0
1 changed files with 1 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue