Server down on multiworld - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Discussion (https://forum.cuberite.org/forum-5.html) +--- Thread: Server down on multiworld (/thread-2125.html) |
Server down on multiworld - DrMasik - 09-18-2015 I found stable solution for server down There are 2 players. First login to World1, second - World2. Default for all other players - World0. All names are lowercase. When player spawn, I check login (GetName()) and move it to needed world (World1 or World2) into home as building. So, let show me cut of code: function Initialize(Plugin) -- ... Cut some code cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_SPAWNED, MyOnPlayerSpawned); -- ... Cut some code end function MyOnPlayerSpawned(Player) -- Cut some code if Player:GetName() == 'test1' then Player:MoveToWorld("world1"); elseif Player:GetName() == 'test2' then Player:MoveToWorld("world2"); end return false; end -- Cut some code And there I have 2 bugs: 1. Player test1 into there home building, but, in world0. Home "copy" from world1 in to world0 and destroy world0 area where home "copy". 2. When player disconnect - server go down (core dump). Server console log: Code: Info: [11:16:34] Player test1 has left the game RE: Server down on multiworld - DrMasik - 09-22-2015 I'm download Windows version of server (buid 102) and catch when server goin down. What I did: 1. Connect to server. 2. Server use HOOK_PLAYER_SPAWNED to run callback function MyOnPlayerSpawned -> Teleport player to world2. 3. I'm wait 5 seconds and disconnect. 4. Connect again to server. (5.) Server use HOOK 6. I'm user /teleport to back to default world. 7. I'm disconnect. 8. Server going down with player count = (-1). Code and screen shoot. -- ... local OnAllChunksAvailable = function() console_log(func_name .." -> chunks redy for player ID ".. a_player:GetUniqueID(), 1); a_player:MoveToWorld("world2"); a_player:TeleportToCoords(-8, 62, 3); a_player:SetGameMode(1); end -- Get world default spawn point local world = cRoot:Get():GetWorld("world2"); local SpawnX = world:GetSpawnX(); local SpawnZ = world:GetSpawnZ(); -- Get player last bed position local PlayerX = (-8); local PlayerZ = 3; world:ChunkStay({{PlayerX, PlayerZ}, {SpawnX, SpawnZ}}, OnChunkAvailable, OnAllChunksAvailable); -- ... Any help or ideas? RE: Server down on multiworld - Seadragon91 - 09-22-2015 Cuberite can not run well with two worlds at the moment. Look here: 2286, 2056 Run cuberite with only one world or you could run multiple server instances of cuberite and connect them over bungeecord, that works fine. RE: Server down on multiworld - DrMasik - 09-22-2015 (09-22-2015, 06:47 AM)Seadragon91 Wrote: Cuberite can not run well with two worlds at the moment. Thank you. I spent more than 36 hours.... Thank you very much to links. Where I can read about "bungeecord"? Any link to source code for analyze? RE: Server down on multiworld - Seadragon91 - 09-22-2015 Okay here a tutorial for it. Follow it step for step. Choose a folder (i choose the name root for them) where you want to set up two servers and bungecord. Bungeecord
Cuberite lobby
Do the same steps above with another cuberite server and change the Ports=25565 to Ports=25567. Start bungeecord and both cuberite servers. In the console of the cuberite servers will come from one the error, that the port 8080 is already in use. You change the port in the file webadmin.ini. Connect to localhost with your minecraft client. And check if you can swap with the command Code: /server world One problem with that is you would have to setup the permissions every time for both servers. If something is unclear or not working, just post and ask. RE: Server down on multiworld - LogicParrot - 08-28-2016 It's worth noting that this thread is old. World travel is pretty stable now. RE: Server down on multiworld - ThuGie - 08-28-2016 Then why did you bump it ? Pretty sure people notice its something from 2015.. RE: Server down on multiworld - DrMasik - 08-28-2016 (08-28-2016, 04:34 AM)LogicParrot Wrote: It's worth noting that this thread is old. World travel is pretty stable now. I will check it and close or not the thread. RE: Server down on multiworld - LogicParrot - 08-29-2016 (08-28-2016, 08:55 AM)ThuGie Wrote: Then why did you bump it ? I think we have things from 2014 that are still unfixed. So, it's just to let people who stumble across this know this is no longer an issue. |