This commit is contained in:
Anuken
2026-01-09 19:42:03 -05:00
parent fc1bfe0b24
commit ac2401daf1
2 changed files with 10 additions and 2 deletions

View File

@@ -119,7 +119,15 @@ public class ContentParser{
}
return result;
});
put(Color.class, (type, data) -> Color.valueOf(data.asString()));
put(Color.class, (type, data) -> {
if(data.isNumber()){
int len = data.asString().length();
if(len != 6 && len != 8){
warn("@Colors should strings, not numbers. Make sure you have quotes around the value, or they will not be parsed correctly: '@'", currentContent == null ? "" : "[" + currentContent.minfo.sourceFile.name() + "]: ", data);
}
}
return Color.valueOf(data.asString());
});
put(StatusEffect.class, (type, data) -> {
if(data.isString()){
StatusEffect result = locate(ContentType.status, data.asString());