From ea470783da560e804336494541fb47a4f8ca942c Mon Sep 17 00:00:00 2001 From: Justin Russo Date: Tue, 12 Mar 2019 18:39:46 -0400 Subject: [PATCH] fix: players not getting tutorial stage on servers At least as a temporary fix, this will resolve issues where a player would not recieve the tutorial stage when joining the server. --- src/scripts/crafttweaker/events/playerLoggedIn.zs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/scripts/crafttweaker/events/playerLoggedIn.zs b/src/scripts/crafttweaker/events/playerLoggedIn.zs index 992bb2c05..f6dd225cb 100644 --- a/src/scripts/crafttweaker/events/playerLoggedIn.zs +++ b/src/scripts/crafttweaker/events/playerLoggedIn.zs @@ -11,6 +11,8 @@ import crafttweaker.event.PlayerLoggedInEvent; import crafttweaker.events.IEventManager; +import scripts.crafttweaker.stages.stageTutorial; + /* Add event listener */ @@ -25,5 +27,11 @@ function init() { ); event.player.sendChat("Thanks again for helping to test new updates!"); } + + // Make sure the player has the tutorial stage + // This helps prevent issues when a new player joins + if (!event.player.hasGameStage(stageTutorial.stage)) { + event.player.addGameStage(stageTutorial.stage); + } }); }