We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents befebbf + 9b192e7 commit 93a2c94Copy full SHA for 93a2c94
api/src/main/java/me/tofaa/entitylib/ve/ViewerEngine.java
@@ -121,8 +121,8 @@ public void clearTracked() {
121
* @return true if the user passed and did not fail any rules, false otherwise
122
*/
123
public boolean canSpawnFor(User user, WrapperEntity entity) {
124
- if (entity.getViewerRules().stream().anyMatch(rule -> rule.shouldSee(user))) return true;
125
- 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));
126
}
127
128
/**
0 commit comments