mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix anvil inventory sometimes not updating & version up
This commit is contained in:
parent
33c90e1541
commit
57cd58657d
4 changed files with 10 additions and 3 deletions
|
|
@ -276,6 +276,8 @@ class AnvilEventListener : Listener {
|
|||
event.view.setProperty(REPAIR_COST, newXp)
|
||||
|
||||
inventory.setItem(ANVIL_OUTPUT_SLOT, resultItem)
|
||||
|
||||
player.updateInventory()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -536,6 +538,11 @@ class AnvilEventListener : Listener {
|
|||
inventory.repairCost = finalAnvilCost
|
||||
|
||||
event.view.setProperty(REPAIR_COST, finalAnvilCost)
|
||||
|
||||
val player = event.view.player
|
||||
if(player is Player){
|
||||
player.updateInventory()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
main: io.delilaheve.CustomAnvil
|
||||
name: CustomAnvil
|
||||
prefix: "Custom Anvil"
|
||||
version: 1.4.0a
|
||||
version: 1.4.1a
|
||||
description: Allow to customise anvil mechanics
|
||||
api-version: 1.18
|
||||
load: POSTWORLD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue