Change PlayerFinishCourseEvent order
szumielxd opened this issue ยท 1 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.