PocketMine-MP icon indicating copy to clipboard operation
PocketMine-MP copied to clipboard

PlayerExhaustEvent: misunderstood of getPlayer method

Open Blackjack200 opened this issue 3 years ago • 2 comments

Issue description

PlayerExhaustEvent may misunderstood to player's hunger exhaust, and the method getPlayer is confused because it may return a non-player object if using a custom human.

https://github.com/pmmp/PocketMine-MP/blob/c87a3b054cf29282464f50b6234638b2bbe665ab/src/event/player/PlayerExhaustEvent.php#L32

Blackjack200 avatar Jun 02 '22 01:06 Blackjack200

player's event not only called for player, but also for custom human

Blackjack200 avatar Jun 02 '22 07:06 Blackjack200

Yeah, one of my plugins just crashed because of this

TrinitroToluen0 avatar Apr 06 '24 23:04 TrinitroToluen0