File tree Expand file tree Collapse file tree
src/main/java/fr/maxlego08/essentials/listener Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,8 +189,12 @@ public void onJoin(PlayerJoinEvent event) {
189189 User user = this .plugin .getUser (player .getUniqueId ());
190190 if (user != null ) user .startCurrentSessionPlayTime ();
191191
192- if (user != null && user .isFirstJoin () && ConfigStorage .spawnLocation != null && ConfigStorage .spawnLocation .isValid ()) {
193- this .plugin .getScheduler ().teleportAsync (player , ConfigStorage .spawnLocation .getLocation ());
192+ if (user != null && user .isFirstJoin ()) {
193+ if (ConfigStorage .firstSpawnLocation != null && ConfigStorage .firstSpawnLocation .isValid ()) {
194+ this .plugin .getScheduler ().teleportAsync (player , ConfigStorage .firstSpawnLocation .getLocation ());
195+ } else if (ConfigStorage .spawnLocation != null && ConfigStorage .spawnLocation .isValid ()) {
196+ this .plugin .getScheduler ().teleportAsync (player , ConfigStorage .spawnLocation .getLocation ());
197+ }
194198 }
195199
196200 if (user != null && user .getOption (Option .VANISH )) {
You can’t perform that action at this time.
0 commit comments