Implement World (un)load API #134

Open
opened 2023-07-18 13:41:59 +02:00 by kyngs · 7 comments
kyngs commented 2023-07-18 13:41:59 +02:00 (Migrated from github.com)

Yes, I need to load worlds on startup from my plugin

Describe the solution you'd like.

Implement the current Bukkit API instead of throwing an exception

Describe alternatives you've considered.

  • Patch folia and hardcode the worlds I need
  • Not to use folia

Other

Thre's been a PR on this subject, but it was closed. I didn't find any issue tracking this matter.

### Is your feature request related to a problem? Yes, I need to load worlds on startup from my plugin ### Describe the solution you'd like. Implement the current Bukkit API instead of throwing an exception ### Describe alternatives you've considered. - Patch folia and hardcode the worlds I need - Not to use folia ### Other Thre's been a PR on this subject, but it was closed. I didn't find any issue tracking this matter.
KonusIntelliJ commented 2023-07-21 12:20:29 +02:00 (Migrated from github.com)

I'm waiting too a fix world API create/load

I'm waiting too a fix world API create/load
maglink commented 2023-10-07 01:50:31 +02:00 (Migrated from github.com)

So, I'd uncommented "load world" function and it works perfectly. But I'm using it only on server startup. May be problems if use it during the game.

So, I'd uncommented "load world" function and it works perfectly. But I'm using it only on server startup. May be problems if use it during the game.
kaxonomy commented 2023-10-07 02:16:40 +02:00 (Migrated from github.com)

Uncommenting load world function probably works during startup. I use https://github.com/Folia-Inquisitors/MoreFoWorld

Uncommenting load world function probably works during startup. I use https://github.com/Folia-Inquisitors/MoreFoWorld
kyngs commented 2023-10-07 16:06:51 +02:00 (Migrated from github.com)

At least as a temporary solution, the world API should only be available from the start. The absence of this is still holding many plugins from moving to Folia.

At least as a temporary solution, the world API should only be available from the start. The absence of this is still holding many plugins from moving to Folia.
TrueMB commented 2024-06-24 17:03:53 +02:00 (Migrated from github.com)

Are there any news about un-/loading worlds? I also would need it during runtime.
From what I saw it is planed to add world loading support. Does this also include while running?

Are there any news about un-/loading worlds? I also would need it during runtime. From what I saw it is planed to add world loading support. Does this also include while running?
xunto commented 2025-03-08 00:14:06 +01:00 (Migrated from github.com)

I was trying to migrate my client's server to Folia, but it seems that because you can't (dynamically) load/unload worlds, I can't do that. It's a server with a gimmick similar to skyblock (e.g. dynamic persistent small maps).

That's a bummer. 😆

If it's still a thing? Or am I doing something wrong?

java.lang.UnsupportedOperationException: null
	at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:1323) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
	at org.bukkit.Bukkit.createWorld(Bukkit.java:838) ~[folia-api-1.21.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.WorldCreator.createWorld(WorldCreator.java:502) ~[folia-api-1.21.4-R0.1-SNAPSHOT.jar:?]
...
	at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[folia-1.21.4.jar:?]
	at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[folia-1.21.4.jar:?]
	at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:293) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
	at io.papermc.paper.threadedregions.RegionizedServer$GlobalTickTickHandle.tickRegion(RegionizedServer.java:148) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
	at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
	at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.2.jar:?]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

I was trying to migrate my client's server to Folia, but it seems that because you can't (dynamically) load/unload worlds, I can't do that. It's a server with a gimmick similar to skyblock (e.g. dynamic persistent small maps). That's a bummer. 😆 If it's still a thing? Or am I doing something wrong? ``` java.lang.UnsupportedOperationException: null at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:1323) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef] at org.bukkit.Bukkit.createWorld(Bukkit.java:838) ~[folia-api-1.21.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.WorldCreator.createWorld(WorldCreator.java:502) ~[folia-api-1.21.4-R0.1-SNAPSHOT.jar:?] ... at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[folia-1.21.4.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[folia-1.21.4.jar:?] at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:293) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef] at io.papermc.paper.threadedregions.RegionizedServer$GlobalTickTickHandle.tickRegion(RegionizedServer.java:148) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef] at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef] at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.2.jar:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] ```
NonSwag commented 2025-03-08 07:26:39 +01:00 (Migrated from github.com)

World loading is relatively stable even during runtime (you just have to tweak the load code a bit)
World unloading kills the server though
I haven't had any significant success with it
The best result I had was not crashing the entire server but the world was technically still loaded even though not accessible

World loading is relatively stable even during runtime (you just have to tweak the load code a bit) World unloading kills the server though I haven't had any significant success with it The best result I had was not crashing the entire server but the world was technically still loaded even though not accessible
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#134
No description provided.