Cuberite Forum

Full Version: Lua hooks needed!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
but it would be like OnPlayerPlacedBlock and OnPlayerPlacingBlock.
OnTakingDamage would be called before the Entity would actualy take damage.
OnTakeDamage() is called before the entity takes any damage, so it works as if it was an OnTakingDamage(). So actually it's OnTakenDamage() that's missing.
I was thinking if the hook OnChat returns a string that it will use that string as the message.
Well, it's not exactly needed, you can already stop the chat message and broadcast another one. But it's a good idea, yes. Maybe put it into the flyspray as a suggestion, so that it doesn't get forgotten. Or if you're brave enough, do the change yourself Wink cPlugin_NewLua.cpp is the place.
So, i looked into cPluginNewLua.cpp and i have no clue what is going on so i'll just put it in Flyspray Wink
I think MCServer needs some more hooks like:
  • OnHopperPullingItem
  • OnHopperTransferringItem
  • OnExplosion
Hoppers don't have a concept of "transfering", they pull items in and push items out, nothing more. Later on they should also pull pickups in, that's not implemented yet.
Put it in the flyspray tracker, preferably into two separate issues (hopper vs explosion), suggest parameters, return values and behavior.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13