Skip to content

Commit

Permalink
Replace calls to deprecated LuaArrayHelper.toArray
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Sep 27, 2023
1 parent 190e02e commit 7465c7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public ChatAction create(String className, final LuaTable args) {
className = "games.stendhal.server.entity.npc.action." + className;
Object[] objects = null;
if (args != null && !args.isnil()) {
objects = LuaArrayHelper.get().toArray(args);
objects = LuaArrayHelper.get().fromTable(args);
}

final boolean noArgs = objects == null || objects.length == 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public ChatCondition create(String className, final LuaTable args) {
className = "games.stendhal.server.entity.npc.condition." + className;
Object[] objects = null;
if (args != null && !args.isnil()) {
objects = LuaArrayHelper.get().toArray(args);
objects = LuaArrayHelper.get().fromTable(args);
}

final boolean noArgs = objects == null || objects.length == 0;
Expand Down

0 comments on commit 7465c7b

Please sign in to comment.