How to keep a world always load?


#1

When I go to main world from Nether, I found this log in console

[18:16:34] [Server thread/INFO] [Sponge]: Unloading world [DIM-1] (DIM-1)

And I hope the Nether or the other world can always load even nobody in. How can I do it?
Appreciation!


#2

My question is why do you want this?


#3

I think it’s possible by creating a fake player and putting that inside all worlds, but I don’t think your server’s gonna like it


#4

make machine work


#5

how to do that?


#6

Custom plugin I guess


#7

I can write a small custom plugin


#8

https://docs.spongepowered.org/stable/en/server/getting-started/configuration/sponge-conf.html?highlight=keep-spawn-loaded

keep-spawn-loaded boolean false If the spawn should stay loaded with no players. Has no effect in global config. Config doesn’t need to be enabled either, because it will always fall back to the world config.

load-on-startup boolean false If the world should be loaded on startup. Has no effect in global config. Config doesn’t need to be enabled either, because it will always fall back to the world config.

Note: I am unable to find it, but #voice on discord atm agree that there may be some problems with it.

Honestly you can mostly ignore this if you have a SSD, Sponge will mostly manage it itself. Especially in the nether, which doesn’t have a true spawn.


#10

Wow! That’s will be highly appreciated !


#11

Maybe you misunderstand what i said, my purpose is to make server load world always not unload


#12

I did not misunderstand. You should read the configuration docs I listed.


#13

You did misunderstand. He isn’t worried about startup times, he wants things like machines to still work.


#14

Yes! Just like @pie_flavor said, I want my machine always work even nobody in the Nether.


#15

@watcherman Sorry I was being rude, you didn’t deserve that.

But my point still stands, that there are configuration options that can be set in order to keep areas loaded. The last part was merely an addendum, you are of course free to change those options.

The whole world cannot be kept loaded, as the amount of chunks that can generate generally exceeds the amount of ram. The same goes for the overworld.

If you want specific areas to be loaded, as opposed to worlds,

  1. You need to set those configuration options to prevent the worlds unloading (assuming they work, if they don’t file a bug report)

  2. You need something (There are several mods, maybe even some plugins) that can provide chunk loading capability for a given area. If something is being explicitly chunk loaded, the worlds probably shouldn’t unload anyway regardless of config option, but they won’t hurt.


#16

Very appreciated for you !

Well, actually, i had read docs of sponge and not found configuration about loading Nether, so i come here for help, maybe I lost some of it. I’m going to try using someone of mod to solve this matter.

Once again, very thanks for your help !


#17

download link: https://ufile.io/bawp3

if you want the source code just ask


#18

Thank you very much! It’s appreciated if you can provide source code!


#19

@watcherman

https://pastebin.com/mkq7YCet


#20

Well, I have used plugin, the stop-unload, and the console throw the “null point error” constantly and it didn’t happen when I remove the stop-unload plugin. How can I solve this problem?


#21

Can we see the logs? That appears unlikely looking at the source code.

If the only difference is having this plugin installed, then please make an issue on github.com/Spongepowered/SpongeCommon/issues/new if it doesn’t already exist on our tracker. Provide the pastebin that MoseMister supplied as well.

@MoseMister I do wonder what the behavior would be when the server is shutting down…