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

  • 521
  • 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: MultiWorld doesn't load worlds properly by EdibleTortilla
[April 22, 2018, 05:23:44 PM]


MultiWorld doesn't load worlds properly by EdibleTortilla
[April 20, 2018, 08:05:05 PM]


Re: Interacting with Bungeecord by CodeCrafter47
[April 20, 2018, 03:15:05 AM]


[Request] SkinRestorer by EdibleTortilla
[April 19, 2018, 06:40:50 PM]


Re: Interacting with Bungeecord by EdibleTortilla
[April 19, 2018, 04:02:18 PM]

* Forum Stats

  • stats Total Members: 3686
  • stats Total Posts: 12322
  • stats Total Topics: 1666
  • stats Total Categories: 5
  • stats Total Boards: 16
  • stats Most Online: 568