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

Second selector in stats command does not work with @p, @s, @e, etc.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None

      The second selector in the /stats command does not work with selectors, but does work with strings/names.

      To reproduce, first set up an objective and show it in the sidebar:

      /scoreboard objectives add test dummy
      /scoreboard objectives setdisplay sidebar test

      Then we can use a second selector with the command.

      /scoreboard players set @p test 0
      /stats entity @p set SuccessCount @p test
      /testfor @e

      If using spigot you will now see a final score of 0, but if using vanilla you will see a larger number as the score.

      To show it working with a simple string, we can do the following:

      /scoreboard players set fakename test 0
      /stats entity @p set SuccessCount fakename test
      /testfor @e

      The final score will be a number larger than 0 when using spigot and in vanilla.

            Unassigned Unassigned
            zedwick@gmail.com Zedadias Wick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: