Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-8998

Team option "friendlyfire" is not saved to disk; resets upon map reload

XMLWordPrintable

    • Unconfirmed

      What I expected to happen was:
      If a team was set to have "friendlyfire" false, it would stay false even after the server is restarted.

      What actually happened was:
      The "friendlyfire" option reset to true, and players on the team were again able to attack each other.

      Steps to reproduce:
      1. Create a team to test with - "/scoreboard teams add test"
      2. Set that team's friendlyfire option to false - "/scoreboard teams option test friendlyfire false"
      3. Observe that players on this team cannot harm each other with attacks. You can add them with "/scoreboard teams join test <player>"
      4. Restart the server.
      5. Observe that, although the players are still on this team, they can now harm each other.

      This is rather problematic, as it may not always be possible to use commandblocks to change the friendlyfire option (e.g. when recovering from a server crash), and in general it is a hassle, and I can imagine many people wouldn't know about this bug because the option seems to work when first tested.

      This issue is not specific to SMP, although the option has no purpose outside SMP. It is caused by a lack of serialization of the friendlyfire option when the scoreboard.dat NBT data is written.

            dinnerbone [Mojang] Nathan Adams
            wolfiemario WolfieMario
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: