implemented a persistent ability-use disabled flag on the PlayerProfile - #5305
implemented a persistent ability-use disabled flag on the PlayerProfile#5305BlvckBytes wants to merge 1 commit into
Conversation
|
Perhaps I'm missing something, but would this not need to be written to the DB to be persistent? I thought Spigot was throwing away this metadata upon player logout. |
|
Hey - and so sorry for the late reply! The See In any case, I'd be happy to extend the missing save/load handlers - I've heard from many players and different servers by now that they'd be happy if toggling was persistent. |
|
I've just had another look and noticed how I'm going to create a new PR, as I don't deem this route viable. |
Hey there!
Some players on our server prefer to have the ability-use-mode (
/mcability) disabled long-term. Currently, they have to run the command after each login, so I implemented a persistent flag on thePlayerProfile, using the already-existingUniqueDataType.The reason as to why I went with a disable-flag is that it does not break backwards-compatibility. The default-value of the flag is zero, thus ability-use is not disabled, just as it wasn't in the past, after logging in. The only difference is that the setting now sticks long-term.
I hope I explained the use-case well enough. Always happy to further discuss!