Flags toggled off by default not being stored in database for new cuboids
PIE-yt opened this issue ยท 9 comments
Flags toggled off by default (such as "?prevent-mob-spawn") aren't having there disabled state applied to new cuboid fields after a server restart.
I've checked the MySQL database and the "flags" key in the "pstone_cuboids" table is being left blank, which I think could perhaps be the issue.
I'm using:
PreciousStones version 10.5.4
Spigot 1.12
Thanks for your time.
Try turning on show-debug-info: true in settings to see when that SQL query writing flags shows up and if it has data there.
Sorry for the delay.
I've checked the debug (and attached it), it appears to be writing {} for the flags key.
Debug Output.txt
I've also attached the field definition
Field Config.txt
Tested on PS version 10.6.0
Thanks for your help.
So is this whats happening?
- Place LynxGuardian
- /ps toggle prevent-mob-spawn
- Mob spawn is disabled
- Console debug output has flags: {}
- Restart server
- Mob spawn is enabled again
/ps toggle works OK and saves the flags as it should. The issue is with flags that are attached to a field, but disabled on placement with the "?" prefix, such as: ?prevent-mob-spawn
.
- Place LynxGuardian
- Console debug output has flags: {}
- The "protect-inventory", "prevent-mob-spawn", "prevent-animal-spawn", "prevent-entry", "prevent-teleport" and "remove-mob" flags are showing disabled (greyed out) in the field info - which is what I want.
- Server restarts.
- All flags are then enabled without the need for "/ps toggle"
I'm trying to allow my players to place fields with extra flags disabled by default, so I can then have them pay to use "/ps toggle" (which I can do using BoosCooldowns) to switch the flags back on (I've not set this up yet so it can't be interfering.)
Hope that makes sense.
Thanks for your time.