From 1a973561167fe7eee67fb1590a7590f8d7166f2a Mon Sep 17 00:00:00 2001 From: Bierque Jason Date: Sun, 21 Feb 2021 13:34:08 +0100 Subject: [PATCH] Stop loop when flags set to false (#5101) --- ...ement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index 1913b95a36..a58bef7c16 100644 --- a/Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -418,14 +418,14 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 + + // not a fan of this + private boolean ofAcceptableType(Collection 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 }