Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

collapse

Author Topic: How does onPlayerDeath work?  (Read 164 times)

JD9999

  • Plug-in Maker
  • Hero Member

  • Offline
  • ****

  • 751
  • Reputation:
    +45/-0
    • View Profile
How does onPlayerDeath work?
« on: 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

  • Offline
  • *****

  • 514
  • Reputation:
    +130/-2
    • View Profile
Re: How does onPlayerDeath work?
« Reply #1 on: 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

  • Offline
  • ****

  • 751
  • Reputation:
    +45/-0
    • View Profile
Re: How does onPlayerDeath work?
« Reply #2 on: 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

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Topics

Re: MCPublic -- Free server hosting by Reinert
[November 07, 2017, 06:53:51 AM]


Re: How does onPlayerDeath work? by JD9999
[October 04, 2017, 03:30:31 PM]


Re: How does onPlayerDeath work? by CodeCrafter47
[October 04, 2017, 04:53:08 AM]


How does onPlayerDeath work? by JD9999
[October 03, 2017, 07:58:47 PM]

* Forum Stats

  • stats Total Members: 3682
  • stats Total Posts: 12304
  • stats Total Topics: 1663
  • stats Total Categories: 5
  • stats Total Boards: 16
  • stats Most Online: 568