mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-04 23:32:55 +08:00
perf: simplify optional chain
This commit is contained in:
parent
f01da54eaa
commit
8f8a6a7bfe
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user