Skip to content

Commit

Permalink
Fixed ItemFlag application
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Aug 29, 2021
1 parent c851e35 commit 3d07e10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ItemFlag> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ItemFlag> {
Expand Down

0 comments on commit 3d07e10

Please sign in to comment.