diff --git a/src/main/java/emu/grasscutter/scripts/ScriptLib.java b/src/main/java/emu/grasscutter/scripts/ScriptLib.java index 6eaac1849..2118ea861 100644 --- a/src/main/java/emu/grasscutter/scripts/ScriptLib.java +++ b/src/main/java/emu/grasscutter/scripts/ScriptLib.java @@ -1997,7 +1997,7 @@ public class ScriptLib { logger.debug("[LUA] Call DropSubfield with {}", printTable(table)); String subfield_name = table.get("subfield_name").toString(); var entity = getCurrentEntity(); - if (!entity.isPresent()) return -1; + if (entity.isEmpty()) return -1; entity.get().dropSubfield(subfield_name);