fix HealthChange event name error

This commit is contained in:
JunDao
2019-05-15 00:02:59 +08:00
parent abf8c72e26
commit a005470e2b
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ type eventBroker struct {
GameStart func() error
ChatMsg func(msg chat.Message, pos byte) error
Disconnect func(reason chat.Message) error
HealhtChange func() error
HealthChange func() error
Die func() error
SoundPlay func(name string, category int, x, y, z float64, volume, pitch float32) error
}

View File

@ -295,8 +295,8 @@ func handleUpdateHealthPacket(c *Client, p pk.Packet) (err error) {
c.Food = int32(Food)
c.FoodSaturation = float32(FoodSaturation)
if c.Events.HealhtChange != nil {
err = c.Events.HealhtChange()
if c.Events.HealthChange != nil {
err = c.Events.HealthChange()
if err != nil {
return
}