From 3d07e10543dd458a7fbd6cb556fcc34269c0e56c Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sun, 29 Aug 2021 16:33:31 +0100 Subject: [PATCH] Fixed ItemFlag application --- .../com/willfp/eco/proxy/v1_16_R3/fast/NMSFastItemStack.kt | 4 ++++ .../com/willfp/eco/proxy/v1_17_R1/fast/NMSFastItemStack.kt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/fast/NMSFastItemStack.kt b/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/fast/NMSFastItemStack.kt index ab2e2442..0476ffe3 100644 --- a/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/fast/NMSFastItemStack.kt +++ b/eco-core/core-nms/v1_16_R3/src/main/kotlin/com/willfp/eco/proxy/v1_16_R3/fast/NMSFastItemStack.kt @@ -101,12 +101,16 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS for (flag in hideFlags) { this.flagBits = this.flagBits or getBitModifier(flag) } + + apply() } override fun removeItemFlags(vararg hideFlags: ItemFlag) { for (flag in hideFlags) { this.flagBits = this.flagBits and getBitModifier(flag) } + + apply() } override fun getItemFlags(): MutableSet { diff --git a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/fast/NMSFastItemStack.kt b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/fast/NMSFastItemStack.kt index 03c93e8d..107fa355 100644 --- a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/fast/NMSFastItemStack.kt +++ b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/proxy/v1_17_R1/fast/NMSFastItemStack.kt @@ -120,12 +120,16 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS for (flag in hideFlags) { this.flagBits = this.flagBits or getBitModifier(flag) } + + apply() } override fun removeItemFlags(vararg hideFlags: ItemFlag) { for (flag in hideFlags) { this.flagBits = this.flagBits and getBitModifier(flag) } + + apply() } override fun getItemFlags(): MutableSet {