little changed

This commit is contained in:
Yaode_owo 2024-12-09 07:23:43 -05:00
parent ac303c5fc6
commit 14afba3a2b

View file

@ -72,8 +72,11 @@ function processNBTComponent(data) {
}
function VaildText(comp) {
if ((comp || comp !== "") && (comp.text || comp.text !== "") && (comp.keybind || comp.keybind !== "") && (comp.translate || comp.translate !== "")) return true
return false;
return (typeof comp === "string" && comp !== "") ||
(typeof comp.text === "string" && comp.text !== "") ||
(typeof comp.keybind === "string" && comp.keybind !== "") ||
(typeof comp.translate === "string" && comp.translate !== "") ||
(typeof comp.extra === "object" && Array.isArray(comp.extra));
}
function parseMinecraftColor(color) {