collapse

: How does onPlayerDeath work?  ( 263 )

JD9999

  • Plug-in Maker
  • Hero Member
  • ****
  • : 754
  • Reputation: +45/-0
How does onPlayerDeath work?
« : October 03, 2017, 07:58:47 PM »
Hi everybody,

I was testing RainbowDeathChest and I have noticed something interesting.

For some reason, when I use the /kill command, the items of the player victim are NOT stored in the chests, but when a player kills another player, the items are stored.

Is the plrVictim argument always the player when they die?

Thanks,
JD9999



CodeCrafter47

  • Administrator
  • Hero Member
  • *****
  • : 518
  • Reputation: +131/-2
Re: How does onPlayerDeath work?
« #1 : October 04, 2017, 04:53:08 AM »
plrVictim is always the player who died. But I think the onPlayerDeath event is slightly broken, it's not being called when death messages are disabled. I'll fix that when I get around. Should be called on kill command though.

JD9999

  • Plug-in Maker
  • Hero Member
  • ****
  • : 754
  • Reputation: +45/-0
Re: How does onPlayerDeath work?
« #2 : October 04, 2017, 03:30:31 PM »
plrVictim is always the player who died. But I think the onPlayerDeath event is slightly broken, it's not being called when death messages are disabled. I'll fix that when I get around. Should be called on kill command though.

OK, thanks! I will look into the plugin and see if it is a problem at my end.

 

* Notifications

* Member Info

 
 

* Recent Topics

Re: Thoughts on Minecraft 1.13 Fredashay
[February 07, 2018, 06:24:46 PM]


Re: Thoughts on Minecraft 1.13 CodeCrafter47
[February 07, 2018, 09:29:50 AM]


Re: Thoughts on Minecraft 1.13 JD9999
[January 23, 2018, 05:38:41 AM]


Re: Thoughts on Minecraft 1.13 UnknownUser500
[January 21, 2018, 12:36:40 PM]


Re: Thoughts on Minecraft 1.13 BlackScorpion
[January 20, 2018, 04:00:58 PM]

* Forum Stats

  • stats : 3684
  • stats : 12313
  • stats : 1663
  • stats : 5
  • stats : 16
  • stats Most Online: 568
Powered by SMFPacks Alerts Pro Mod
SimplePortal 2.3.5 © 2008-2012, SimplePortal