5

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)

Server console on the left, Game on the right

  • 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?

2 Answers 2

1

Spigot gamerules are world specific. Download the Multiverse plugin and /mv gamerule mobGriefing false world_the_nether.

0

You said you changed the value to "False"

The value must be lowercase, as in "false" same with "true".

Was just a typo, not actually the problem

2
  • no, thats nothing, you can see in the game window that it notices the function. Apr 7, 2021 at 14:19
  • 2
    Edited my post. I just wrote that wrong in the post here. The commands were working and I got correct command feedback on them.
    – IceFreez3r
    Apr 14, 2021 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .