Solved World switcher after x minutes

Discussion in 'Plugin Development' started by voltywolty, Oct 23, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    voltywolty

    Hey all! I am trying to make a 24/7 server for minecraft that hosts DvZ. I got the server, I got the DvZ, now I just need a world rotation after a certain amount of time. If there is a plugin for this or where to start, that'd be very helpful.
    I just want it to be able to detect whether the game has started or whether there is a player or not. If there aren't any players, just have it countdown x minutes then switch world to a different world.
     
  2. Offline

    KarimAKL

    @voltywolty I don't know what DvZ is, but you could try looking for an API that tells you when a game starts.
     
  3. Offline

    voltywolty

    It's my game mode.
     
  4. Offline

    KarimAKL

    In that case, you can make your own API for it.
     
  5. Offline

    Eltik

    If it's your own game mode, you could just code it in probably. It's a bit difficult to understand exactly what you're looking for. Ex. what is world rotation? What is your own game mode? What is DvZ?
     
  6. Offline

    voltywolty

    What I mean by world rotation is that if the lobby is empty or a game hasn't' started, the server will change the world it's on. For example, it changes from a FLAT world to a NORMAL world, but only if there are 0 players or the game is over.

    DvZ stands for Dwarves vs. Zombies, it's a roleplaying game mode. Everyone starts as a dwarf, then when they die, they become a monster and kill until there are no more dwarves, or all the shrines fall.

    However, since DvZ's (originally not made by me, but recreated by me) source code was never released, I cannot see how they change worlds when the game is over. I hope this clears things up on what I mean.

    Something similar to Multiverse, but the server switches the world when the game is done or there are no players after a certain time.
     
    Last edited: Oct 25, 2021
  7. Offline

    KarimAKL

    So you just want to change the world? In that case, you simply have to teleport the players.
    Location includes the world.
     
  8. Offline

    voltywolty

    Oh, I did not know that! I’ll try it out. To get all of the worlds in the server folder, do I just need to create an ArrayList<String> and add the worlds from the directory into it? Then load the worlds by name if it's added?
     
    Last edited: Oct 26, 2021
Thread Status:
Not open for further replies.

Share This Page