Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public class ExprNearestEntity extends SimpleExpression<Entity> {

static {
Skript.registerExpression(ExprNearestEntity.class, Entity.class, ExpressionType.COMBINED,
"[the] nearest %*entitydatas% [[relative] to %entity/location%]",
"[the] %*entitydatas% nearest [to %entity/location%]");
"[the] (nearest|closest) %*entitydatas% [[relative] to %entity/location%]",
"[the] %*entitydatas% (nearest|closest) [to %entity/location%]");
}

@SuppressWarnings("NotNullFieldNotInitialized")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test "nearest entity does not allow duplicate entities":
assert nearest cow and cow relative to {_null} to fail with "duplicate entities were allowed in nearest entity expr"
assert closest cow and cow relative to {_null} to fail with "duplicate entities were allowed in nearest entity expr"

# server doesn't spawn the entities until the next tick, and we can't wait in the test system so... commented for now
#test "nearest entity":
Expand Down
Loading