Skip to content
Merged
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
4 changes: 2 additions & 2 deletions api/src/main/java/me/tofaa/entitylib/ve/ViewerEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ public void clearTracked() {
* @return true if the user passed and did not fail any rules, false otherwise
*/
public boolean canSpawnFor(User user, WrapperEntity entity) {
if (entity.getViewerRules().stream().anyMatch(rule -> rule.shouldSee(user))) return true;
return globalRules.stream().anyMatch(rule -> rule.shouldSee(user));
if (!entity.getViewerRules().isEmpty() && entity.getViewerRules().stream().allMatch(rule -> rule.shouldSee(user))) return true;
return globalRules.stream().allMatch(rule -> rule.shouldSee(user));
}

/**
Expand Down