Stop loop when flags set to false (#5101)

This commit is contained in:
Bierque Jason 2021-02-21 13:34:08 +01:00
parent f7d098fd7e
commit 1f2b6f865b

View file

@ -418,14 +418,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ // not a fan of this
+ private boolean ofAcceptableType(Collection<Namespaced> namespacedResources) {
+ boolean valid = true;
+
+ for (Namespaced resource : namespacedResources) {
+ if (valid && !(resource instanceof org.bukkit.NamespacedKey || resource instanceof com.destroystokyo.paper.NamespacedTag)) {
+ valid = false;
+ if (!(resource instanceof org.bukkit.NamespacedKey || resource instanceof com.destroystokyo.paper.NamespacedTag)) {
+ return false;
+ }
+ }
+
+ return valid;
+ return true;
+ }
+ // Paper end
}