Closed uramnoil closed 2 years ago
I would like to control
dropContent
in Player#kill() when a player dies. I think it is appropriate to add the flag to HandleDeath() like:func (h *MyHandler) HandleDeath(drop *bool, src world.DamageSource) {}
Would it work if you updated the inventory during this event?
I think a bool like this would make sense. Would probably put it after the src parameter and call it keepInventory
or so.
I would like to control
dropContent
in Player#kill() when a player dies. I think it is appropriate to add the flag to HandleDeath() like:func (h *MyHandler) HandleDeath(drop *bool, src world.DamageSource) {}
Would it work if you updated the inventory during this event?
The inventory change was not a problem. I will push my code soon.
I think a bool like this would make sense. Would probably put it after the src parameter and call it
keepInventory
or so.
Could keepInventory
be abbreviated to keepInv
or something?
Sure, that works.
I would like to control
dropContent
in Player#kill() when a player dies. I think it is appropriate to add the flag to HandleDeath() like: