[SPIGOT-7332] Persistent Data Container of Chunk not saving on stop or restart. Created: 09/Apr/23  Updated: 25/Dec/24  Resolved: 09/Apr/23

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

Type: Bug Priority: Minor
Reporter: ethansito Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.19.4

Attachments: Java Archive File PDCTest-1.0-SNAPSHOT.jar    
Version: 1.19.4-R0.1-SNAPSHOT
Guidelines Read: Yes

 Description   

I am currently writing a plugin using the CustomBlocksData (https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/) plugin to assign persistent data to blocks through chunks' PersistentDataContainers.

The plugin was working perfectly fine, keeping track of data on blocks until recently. Now the data is stored in the persistent data container while the server is online but gets wiped when the server stops or restarts. This happens with saving on stop enabled and happens despite using /save-all before stopping the server.

At first I thought it may have been something I had done, but this issue persists in the bare-bones testing plugin I made. I messaged the author of CustomBlocksData, but he doesn't know what caused the issue either. I remembered I had to install a new version of the spigot server jar recently, so maybe the issue has something to do with that. Thanks!

TEST PLUGIN

Do /test to put a NamespacedKey in the block of the player's location. If the block already has the key when the command is run, a message is sent to the player. Run the command twice to be sure there is a tag on the block. Then, restart the server and run the command again. If there is no message when the command is run the first time, the data did not persist.

Pom.xml: https://paste.md-5.net/uvatakiqum.xml

Main: https://paste.md-5.net/xaxuquxezo.java

TestCommand: https://paste.md-5.net/uvadaxanen.java

Plugin.yml: https://paste.md-5.net/juzodikeyi.makefile



 Comments   
Comment by ethansito [ 10/Apr/23 ]

Thanks! I updated the server JAR and can confirm the fix worked!

Comment by Doc [ 10/Apr/23 ]

I think you need fill the CLA to allow access to stash, but also the PR was merged, then if you update the server JAR can validate if is really fixed.

Comment by ethansito [ 10/Apr/23 ]

When I click the link and sign in, I get a "You do not have permission to access BitBucket" error. Will I not be able to see the status of the issue anymore?

Comment by Marvin Rieple [ 09/Apr/23 ]

Made a PR for this: craftbukkit#1174

Generated at Fri Apr 11 16:00:44 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.