IntellectualSites / IntellectualSites/PlotSquared

Persistent meta is not reused

Open
#3,274 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Bug
Dominant language
Java
Stars
653
Forks
975
Avg merge
2m
Merged PRs (30d)
6

Description

Server Implementation

Purpur

Server Version

1.17.1

Describe the bug

Normally in ps 5.x you only had to set the flags chatspy and worldedit once. From that time forward you could join the server whenever you want and those flags would still be present.

Nowadays. every time you join, you have to enter plot toggle worldedit and plot toggle chatspy in order to make use of these flags.

I think this is managed by this setting:

  # Stores user metadata in a database
  persistent-meta: true

I checked my database. There are now 9 entries for my uuid. 7 Of them contain attrib_worldedit and 2 contains attrib_chatspy
Setting the flags again adds more entries. And they work during that session. So the flags are properly set and saved to the database.
PlotSquared just doesn't retrieves the saved flags to use them.

To Reproduce
  1. join
  2. execute plot toggle worledit
  3. see that it confirms that it's set
  4. check database
  5. rejoin and check again
Expected behaviour

Worldedit and chatspy to be persistent and set once, until you actively set it off (or if the permission to set this flag is taken away).

Screenshots / Videos

No response

Error log (if applicable)

No response

Plot Debugpaste

https://athion.net/ISPaster/paste/view/5774a12c3f7f41d7a988159a896993af

PlotSquared Version

PlotSquared version 6.1.2-Premium

Checklist
Anything else?

When this is solved, I (or PS) should de-double the database to contain only 1 flag per uuid to keep the database sane.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the persistent-meta behavior on PlotSquared 6.1.2-Premium with the provided steps, then inspect how database entries for attrib_worldedit and attrib_chatspy are loaded when a player rejoins. Done means saved flags are restored across sessions and repeated toggles do not create duplicate entries for the same UUID.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.