File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
src/main/kotlin/com/mairwunnx/projectessentials/spawn Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ class ModuleObject : IModule {
5656
5757 @SubscribeEvent
5858 fun onServerStarting (event : FMLServerStartingEvent ) {
59- firstSessionSpawnPoint(event)
59+ if (firstLaunch) {
60+ val world = event.server.getWorld(DimensionType .OVERWORLD )
61+ spawnConfiguration.take().xPos = world.spawnPoint.x
62+ spawnConfiguration.take().yPos = world.spawnPoint.y
63+ spawnConfiguration.take().zPos = world.spawnPoint.z
64+ }
6065 }
6166
6267 @SubscribeEvent(priority = EventPriority .HIGHEST )
@@ -78,15 +83,6 @@ class ModuleObject : IModule {
7883 }
7984 }
8085
81- private fun firstSessionSpawnPoint (event : FMLServerStartingEvent ) {
82- if (firstLaunch) {
83- val world = event.server.getWorld(DimensionType .OVERWORLD )
84- spawnConfiguration.take().xPos = world.spawnPoint.x
85- spawnConfiguration.take().yPos = world.spawnPoint.y
86- spawnConfiguration.take().zPos = world.spawnPoint.z
87- }
88- }
89-
9086 private fun sendLocalizationRequest () {
9187 InterModComms .sendTo(
9288 " project_essentials_core" ,
You can’t perform that action at this time.
0 commit comments