Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Expand Up @@ -16,3 +16,10 @@ test "nearest entity does not allow duplicate entities":
# assert nearest entity relative to {_cow} is {_pig} with "incorrect nearest entity found"
# assert nearest entity relative to (location of {_cow}) is {_cow} with "incorrect nearest entity found when using location"
# delete all entities

###
test "closest entity":
spawn a pig at test-location:
set {_pig} to entity
assert closest entity of test-location is set with "syntax doesn't work :("
###