Skip to content

Commit

Permalink
fix: players not getting tutorial stage on servers
Browse files Browse the repository at this point in the history
At least as a temporary fix, this will resolve issues where a player would not recieve the tutorial stage when joining the server.
  • Loading branch information
justinrusso committed Mar 12, 2019
1 parent 3155976 commit ea47078
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/scripts/crafttweaker/events/playerLoggedIn.zs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import crafttweaker.event.PlayerLoggedInEvent;
import crafttweaker.events.IEventManager;

import scripts.crafttweaker.stages.stageTutorial;

/*
Add event listener
*/
Expand All @@ -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);
}
});
}

0 comments on commit ea47078

Please sign in to comment.