A5H73Y / Parkour

The ultimate Parkour plugin.

Home Page:https://a5h73y.github.io/Parkour/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change PlayerFinishCourseEvent order

szumielxd opened this issue · comments

Actually I can't get player's session data when listening PlayerFinishCourseEvent. This event is fired at the very end of PlayerManager::finishCourse function when session is already deleted, so I don't have any possibility to get such info as player's deaths or player's time. Moving event higher in function may solve this problem.

Also it would be nice to replace old player.showPlayer(otherPlayer) with new player.showPlayer(parkour, otherPlayer) method and analogously do with Player::hidePlayer.

try {
    // 1.12+ servers
    player.showPlayer(parkour, otherPlayer);
} catch (NoSuchMethodError e) {
    // 1.11 fallback
    player.showPlayer(otherPlayer);
}

It would stop visibility collisions with other plugins on 1.12+ servers.

Fixed in v6.6 release.