Toggle SetSlot event when server is setting slot, but not Close, which was a bug.

This commit is contained in:
Tnze
2021-07-05 13:44:05 +08:00
parent e6246ce675
commit 870b4b1a0f

View File

@ -123,8 +123,8 @@ func (m *Manager) onSetSlot(p pk.Packet) (err error) {
err = c.onSetSlot(int(SlotID), ItemStack) err = c.onSetSlot(int(SlotID), ItemStack)
} }
if m.events.Close != nil { if m.events.SetSlot != nil {
if err := m.events.Close(int(ContainerID)); err != nil { if err := m.events.SetSlot(int(ContainerID), int(SlotID)); err != nil {
return Error{err} return Error{err}
} }
} }