Solved Map reset problem

Discussion in 'Plugin Development' started by Funergy, Oct 19, 2014.

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

    Funergy

    So I'm doing my map reset as always
    unload world and load it again and we set auto save to false.

    but this is for Bedwars so sometimes it resets but other times it doesn't.
    so how could I fix this? may it be because the chunk isn't loaded.
    or is it because a player is in that world because I teleport everyone to the lobby when the game ends. I really don't know.
    it only works with 2 players if it is with more it fails
     
  2. Offline

    FerusGrim

    Can you describe better what you're doing, and what isn't happening like you expect it to?
     
  3. Offline

    Funergy

    FerusGrim So I'm finishing a Bedwars minigame. but I just need to fix the map reset.
    So when we played a game with 4 players and when it ends we get teleported back to the lobby in the main world.
    then I unload the world called "map" and then I load it again + I set auto save to false. normally it should reset fully but it only resets the beds. but nothing else. even the item drops aren't removed.
     
  4. Offline

    thomasb454

    The easiest way to do this is -

    Have a start-up script that starts your server of course, before you load the jar remove the world and then from a remote directory (so if you update the map all servers will pull the new map) pull the map into your server's directory and use that as the map. All rolled back, no need to track blocks or deal with Bukkit's unloading and loading of worlds.

    (You'll need to know basic Bash)
     
  5. Offline

    Funergy

    thomasb454 Thats a problem I don't really know how to do this. and I can't change the startup script as our controlpanel is MultiCraft.
    And if I wanna make a backup as a zipfile and place it in the server directory I need to know where the directory of our server is. It can be anything /D/servername/plugins
    And my question is why is it working for these guys http://forums.bukkit.org/threads/map-rollback-method-very-simple.132155/
     
  6. Offline

    xJeremyCx

    Show us your code. Are you sure you're using exactly the same?
    Second, are you sure the world is successfully unloaded and loaded?
    Also, from the comments below that post, many said it doesn't work.
     
  7. Offline

    Funergy

    xJeremyCx Ive done exactly the same
    I load the world I set auto save to false.

    Then I unload the world to rollback
    and then I load it again.

    But the problem with that is it resets when like 2 people are online. but it doesn't work with 2+

    But do players need to be online when the reset is happening?
     
  8. Offline

    xJeremyCx

    From the comments below in the thread, you can see someone said it doesn't work.

    I don't think player needs to be online. Just teleport all of them out of the map. Be sure that you didn't put the world name in servers.properties(level-name)
     
  9. Offline

    Funergy

    xJeremyCx As I said it works with 2 players that joined the minigame. but when we play it with more it fails
     
  10. Offline

    xJeremyCx

     
  11. Offline

    Funergy

    xJeremyCx I've tried to kick them from the server but it still only works with 2 players
     
  12. Offline

    xJeremyCx

    Well, I'm not sure about that. To be honest I don't think it will happen.
     
  13. Offline

    Funergy

    Last edited by a moderator: Jun 14, 2016
Thread Status:
Not open for further replies.

Share This Page