[SPIGOT-151] Add "Read only" mode for worlds Created: 07/Dec/14  Updated: 11/Jul/16  Resolved: 11/Jul/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Paulomart Assignee: Unassigned
Resolution: Fixed Votes: 3
Labels: None

Issue Links:
Relates
relates to SPIGOT-113 Add a way to see when a chunk is pers... Resolved

 Description   

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)



 Comments   
Comment by val59000 [ 26/Dec/14 ]

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

Comment by Janmm14 [ 08/Dec/14 ]

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

Comment by Paulomart [ 08/Dec/14 ]

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

Comment by Jan Delius [ 08/Dec/14 ]

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.

Comment by Paulomart [ 08/Dec/14 ]

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

Comment by Paulomart [ 08/Dec/14 ]

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

Comment by Jan Delius [ 08/Dec/14 ]

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)

Comment by Paulomart [ 08/Dec/14 ]

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

Comment by Janmm14 [ 08/Dec/14 ]

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

Comment by WolfLeader116 [ 07/Dec/14 ]

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.

Generated at Sun Mar 30 17:17:43 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.