Plugin: CowShooter
Now we have enough parts to make a really fun plugin: the CowShooter. If you have a piece of leather in your hand in the game world, you can click to shoot a flaming cow out into the world. When the cow hits the ground, it will explode in a ball of flame, fire, and hamburger.
This plugin is a little different from what we’ve seen so far; there’s no @Command section at all. It’s driven entirely by events.
One problem with a flaming cow is that it won’t stay flaming forever, or even for very long. Normally a flaming cow will catch fire, then the cow dies and the fire goes out. That’s not quite suitable for our purposes: we need the cow to stay on fire as long as it’s flying through the air.
To make that happen, we’ll schedule ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access