Skip to content

Commit

Permalink
support new less-dumb determinations
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 26, 2019
1 parent 741a79f commit 92e792f
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -64,11 +64,8 @@ public boolean isTarget(LivingEntity ent, String prefix, String value) {
if (entries.isEmpty()) {
return false;
}
long id = DetermineCommand.getNewId();
ScriptBuilder.addObjectToEntries(entries, "reqid", id);
InstantQueue queue = InstantQueue.getQueue(ScriptQueue.getNextId(script.getContainer().getName()));
queue.addEntries(entries);
queue.setReqId(id);
String def_name = "entity";
if (script.getContainer().getContents().contains("definitions")) {
List<String> definition_names = CoreUtilities.split(script.getContainer().getString("definitions"), '|');
Expand All @@ -78,8 +75,8 @@ public boolean isTarget(LivingEntity ent, String prefix, String value) {
}
queue.addDefinition(def_name, new dEntity(ent).getDenizenObject());
queue.start();
if (DetermineCommand.hasOutcome(id)) {
return CoreUtilities.toLowerCase(DetermineCommand.getOutcome(id).get(0)).equals("true");
if (queue.determinations != null && queue.determinations.size() > 0) {
return CoreUtilities.toLowerCase(queue.determinations.get(0)).equals("true");
}
}
}
Expand Down

0 comments on commit 92e792f

Please sign in to comment.