I implemented a datapack, that changes certain gamerules like mobGriefing or doInsomnia based on the preferences of the players that are currently playing on the server. The datapack works in a test world realiable, but when I put it on the server the gamerule changes have no effect.
If I check the current state of the gamerule with the server console, the gamerules change if I change my preferences ingame. But if check the same thing with the server chat and an OP-Account, nothing changes. And the output from the chat seems to be the correct one.
Tests
I tested this with mobGriefing. I am the only player online, so if I change my preferences with the datapack they instantly take effect.
- I started with no preference set. So mobGriefing was set to the default, which is
true
, both in console and in the chat. - If I now set my preference to
false
, the gamerule should switch to false. - But it did that only on the console. (Ignore the server restart, it didn't change anything)
- And it had no effect ingame. I tested it with a creeper.
The server runs on spigot in Java 1.16.4. I have not much experience with spigot, but I know commands and functions pretty well.
Do you have any idea, what causes this or how it could be fixed?