mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-11-25 12:05:56 +01:00
Fix null
This commit is contained in:
parent
5e689ff6df
commit
55072fe1c7
@ -439,7 +439,7 @@ class Minion(
|
|||||||
dirty = true
|
dirty = true
|
||||||
|
|
||||||
if (this.tool?.type == Material.AIR) {
|
if (this.tool?.type == Material.AIR) {
|
||||||
entity.setItem(EquipmentSlot.MAIN_HAND, null)
|
entity.setItem(EquipmentSlot.MAIN_HAND, WrappedItemStack.wrap(ItemStack(Material.AIR)))
|
||||||
} else {
|
} else {
|
||||||
entity.setItem(EquipmentSlot.MAIN_HAND, WrappedItemStack.wrap(tool.clone()))
|
entity.setItem(EquipmentSlot.MAIN_HAND, WrappedItemStack.wrap(tool.clone()))
|
||||||
}
|
}
|
||||||
@ -602,7 +602,7 @@ class Minion(
|
|||||||
|
|
||||||
override fun updateArmour() {
|
override fun updateArmour() {
|
||||||
for (entry in EquipmentSlot.entries) {
|
for (entry in EquipmentSlot.entries) {
|
||||||
entity.setItem(entry, null)
|
entity.setItem(entry, WrappedItemStack.wrap(ItemStack(Material.AIR)))
|
||||||
}
|
}
|
||||||
|
|
||||||
setTool(this.tool ?: ItemStack(Material.AIR), false)
|
setTool(this.tool ?: ItemStack(Material.AIR), false)
|
||||||
|
Loading…
Reference in New Issue
Block a user