#Terrain Loading
1 messages · Page 1 of 1 (latest)
I'm just going to assume you mean server side since it's not possible on the client
Yes
Realistically I'd like to have it be done on startup but I'm just trying to test things out for now within my event handler
What you'd need to do is create a Bungeecord plugin that can communicate between the servers
Yeah I thought of doing that through the plugin messaging but I couldn't find anything to trigger terrain loading
Server A <- Your player is here
Server B <- You want them to go here
Bungeecord - Linking A and B
Server A would send a request over a plugin messaging channel (use your own channel). The Bungeecord would catch that message and redirect it to server B. Server B should then start loading the chunks and send a confirmation message when it's done which the Bungeecord would redirect back to Server A so it can teleport the player. Alternativly you can skip the message back to A and directly switch the server of the player from server B
You can use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#loadChunk(int,int,boolean) to load the chunks
declaration: package: org.bukkit, interface: World
Do make sure to unload them if the player doesn't connect or any other cases or you will start leaking memory