• Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None

      There are many minigames, witch need a world reset after playing. Often this is done by copying the world from a buckup back to the server.

      It would be easier, if there would be an option to disable saving. (Blocks, Entities + PlayerData)

          [SPIGOT-151] Add "Read only" mode for worlds

          val59000 added a comment - - edited

          If you use Multiverse Adventure, you can easily reset automatically a world after everyone has left it.
          Works great in 1.8

          val59000 added a comment - - edited If you use Multiverse Adventure, you can easily reset automatically a world after everyone has left it. Works great in 1.8

          Janmm14 added a comment -

          Then it should not get named read-only. A better option would be to disable player data saving of players in that world

          Janmm14 added a comment - Then it should not get named read-only. A better option would be to disable player data saving of players in that world

          Paulomart added a comment -

          I will test that, but it would still be a neat addtion to the API and also much easier.

          Paulomart added a comment - I will test that, but it would still be a neat addtion to the API and also much easier.

          Jan Delius added a comment -

          I think there is a anything like a WorldLoadEvent. When you configure that your plugin loads before world loading, you can catch this event and disable saving there.

          Jan Delius added a comment - I think there is a anything like a WorldLoadEvent. When you configure that your plugin loads before world loading, you can catch this event and disable saving there.

          Paulomart added a comment -

          Also you cant do that on the default world (dim 0)

          Paulomart added a comment - Also you cant do that on the default world (dim 0)

          Paulomart added a comment -

          Jan, I know that, but the point is, that the server will still save playerdata and such, I dont want that.

          Paulomart added a comment - Jan, I know that, but the point is, that the server will still save playerdata and such, I dont want that.

          Jan Delius added a comment -

          I use disabling world saving by plugins for more than 1 year now, and there have never been any problem. Just unload the world without saving after your game and load it again. After loading your world use world.setAutoSave(false);

          https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#setAutoSave(boolean)
          https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Server.html#unloadWorld(org.bukkit.World,%20boolean)

          Jan Delius added a comment - I use disabling world saving by plugins for more than 1 year now, and there have never been any problem. Just unload the world without saving after your game and load it again. After loading your world use world.setAutoSave(false); https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#setAutoSave(boolean ) https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Server.html#unloadWorld(org.bukkit.World,%20boolean )

          Paulomart added a comment -

          You can not disable saving with plugins, I have done a lot of testing about this.

          Paulomart added a comment - You can not disable saving with plugins, I have done a lot of testing about this.

          Janmm14 added a comment - - edited

          Unneeded. Just set world saving to false (can also be done by plugins!) and restart the server.

          Janmm14 added a comment - - edited Unneeded. Just set world saving to false (can also be done by plugins!) and restart the server.

          This would be very helpful indeed as it would be a much more memory and processor efficient method of resetting the world once the adventure map or minigame is completed and changes were made that need to be reverted for the map to be functional once again. I have had many times where world reset plugins have crashed the server and once even the computer. I have tried many different plugins, but none will work properly so this would be a big help as you could then do some sort of special restart/stop command (or if world saving is disabled in the config) just restart/stop the server and nothing is saved, but the server kicks players and shuts down like normal.

          WolfLeader116 added a comment - This would be very helpful indeed as it would be a much more memory and processor efficient method of resetting the world once the adventure map or minigame is completed and changes were made that need to be reverted for the map to be functional once again. I have had many times where world reset plugins have crashed the server and once even the computer. I have tried many different plugins, but none will work properly so this would be a big help as you could then do some sort of special restart/stop command (or if world saving is disabled in the config) just restart/stop the server and nothing is saved, but the server kicks players and shuts down like normal.

            Assignee:
            Unassigned
            Reporter:
            Paulomart
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: