Looking for a plugin that will drop a ghast tear on player death (by another player), but with a custom name depending on the player who died. So for example- Player Bob kills Player Sally Player Sally drops a ghast tear but it is named "Sally's Tears". Is this a possibility?
Yes, it is possible. Let me look into the JavaDocs for something like that. EDIT: Found it, the PlayerDropItemEvent should do the trick, and do you want him to drop all of his inventory with it?
OtherDrops should be able to do this, example (goes at the bottom of the otherdrops-drops.yml file): PHP: PLAYER: - drop: "GHAST_TEAR~%p's Tears" (note: this will drop the players normal inventory and an additional item, being the ghast tear)
Thanks! Not working though, sadly. Console tells me "Error: unknown material (ghasttear~pstears)." This is what's in my otherdrops-drops.yml- PHP: PLAYER: - drop: "GHAST_TEAR~%p's Tears" quantity: 1 chance: 100 Any idea what could be wrong?
Brady_ - ah, sorry - depends on the version you're using, that should work in the latest beta but try "GHAST_TEAR@!~%p's Tears" instead.
So close! It drops a ghast tear with the name of the attacking player, not the victem. I tried changing the "p" to a "v" but when I did that is just says "'s tears" now, with no name.
Yeah, I tired the v but the tear's don't end up getting named with the player's name. I set the debug messages to extreme and here's what I got. Highlighted the part I think might(?) be relevant- (Edited out the name of the person who helped me test, just in case he doesn't want his mc name out there.)
So, OtherDrops isn't working for this. Does anyone else know of a way I can do this? Preferably in a stand-alone plugin, as I don't need all the listeners that OtherDrops comes with.
Sorry, was rather busy then forgot about your request. It should work fine, will try it out tonight. In regards to the listeners, none of them are actually registered (ie. that code doesn't run) unless you use them in the config. Found the issue - I hadn't actually enabled victim names with item displayname variables. Fixed this is the latest dev build (#80, link to CI on BukkitDev page here). Tested with: PHP: PLAYER: - drop: "GHAST_TEAR~%v's Tears" And works now. (Note: OtherDrops version should be 2.8b.536) EDIT by Moderator: merged posts, please use the edit button instead of double posting.