Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3613

SuccessCount not functioning as intended

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • No plugins, latest version of Spigot. Will reproduce in any world.

    • N/A

      When utilizing the SuccessCount stat through the /stats command on an entity, you would expect their score to be set to the success of a command executed on it, while this works for commands that succeed it does not set their score to 0 for commands that fail as it would in Vanilla.

      Here are the commands needed to setup the test in order, this can be done in any world, but preferably an empty one.

      /summon armor_stand ~ ~1 ~ {CustomName:"testingStand",CustomNameVisible:1}
      
      /scoreboard objectives add testing dummy
      
      /scoreboard players set @e[name=testingStand] testing 0
      
      /stats entity @e[name=testingStand] set SuccessCount @s testing
      
      /scoreboard objectives setdisplay sidebar testing

      Now that the test is setup, you should see a scoreboard on the sidebar and an entity listed with a score of 0, we will now execute a successful command on the entity which will increase its score due to the SuccessCount stat. This command should result in the entities score being set to 1.

      /execute @e[name=testingStand] ~ ~ ~ say hi
      

      The next command should set the entities score to the number of entities within a 100 block radius of itself, which appears to work fine in testing.

      /execute @e[name=testingStand] ~ ~ ~ execute @e[r=100] ~ ~ ~ say hi
      

      Now this next command is where it is broken, this command should not succeed and thus should set the entities score back to 0, but in testing we have found that is not the case and instead the score simply does not change from what it was previously.

      /execute @e[name=testingStand] ~ ~ ~ execute @a[r=0,name=Fake] ~ ~ ~ say hi
      

            Unassigned Unassigned
            SpiderRobotMan SpiderRobotMan
            Votes:
            12 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: