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 {
56
56
57
57
@SubscribeEvent
58
58
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
+ }
60
65
}
61
66
62
67
@SubscribeEvent(priority = EventPriority .HIGHEST )
@@ -78,15 +83,6 @@ class ModuleObject : IModule {
78
83
}
79
84
}
80
85
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
-
90
86
private fun sendLocalizationRequest () {
91
87
InterModComms .sendTo(
92
88
" project_essentials_core" ,
You can’t perform that action at this time.
0 commit comments