AssaSheep - Punish sheeps killers: Version: v0.3 Strike down sheep killers. Features: Strikes any player who kills a sheep with lightning. Display a message if you're killed by an exploding Sheep. Send a message to the player if he's hit by a Sheep explosion. If you have mobArena (the dev build), players in arenas won't be affected. Compatible with Damage Modifiers plugins. If a player throw a snowball/egg to a Sheep and deals no damage, the message will be displayed only for the player, so no flood possible and if it does damages (via damage modifiers) it'll act as it would act for an arrow Download The Plugin: AssaSheep v0.3 Source Code: https://github.com/Nicogeta/AssaSheep And in the jar Changelog: Version 0.3: Added a message if you're killed or hit by an exploding Sheep Since mobArena 0.94 is out, no need of two differents Jar, the same Jar if you have or not mobArena Version 0.2: Now compatible with damage modifiers plugins (mcmmo,...) Added a second version for those who have the dev build of mobArena (thanks @ACStache for the help(damage modifier thing) & testing) Version 0.1: Release
Here is my suggested edit to your post Also, it looks like your code will, in the unbelievably rare situation that a skeleton's arrow kills a sheep, cause an error, as you're casting the shooter to Player without confirming it's a player. Simple if() statement will fix that
A bit of a pointless plugin, maybe you could post some information? "Struck down" dosent really tell me anything.
@mbaxter: thanks, it should be ok now I can't believe i forgot the if statement :v Sorry for my english fail, i'm not a native english speaker, sometimes it's hard to find my words^^'