mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Stop loop when flags set to false (#5101)
This commit is contained in:
parent
a5928db4a8
commit
1a97356116
1 changed files with 4 additions and 4 deletions
|
@ -418,14 +418,14 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762
|
|||
+
|
||||
+ // 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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue