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 267 times)

JD9999

  • Plug-in Maker
  • Hero Member

  • Offline
  • ****

  • 754
  • 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
  • *****

  • 518
  • Reputation:
    +131/-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
  • ****

  • 754
  • 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: Thoughts on Minecraft 1.13 by Fredashay
[February 07, 2018, 06:24:46 PM]


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


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


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


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

* Forum Stats

  • stats Total Members: 3684
  • stats Total Posts: 12313
  • stats Total Topics: 1663
  • stats Total Categories: 5
  • stats Total Boards: 16
  • stats Most Online: 568