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

Entity#isGlowing returns incorrect result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:

      Windows 7 Professional
      OpenJDK 12 64-bit build 12+33

    • Version:
      Spigot-94af569-6ddeb98 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
    • Guidelines Read:
      Yes

      Description

      The Entity#isGlowing method seems to be behaving incorrectly. From my understanding, this method is supposed to return false when the entity the method is called on does not have a glowing effect at the time of execution and is supposed to return true when the entity the method is called on does have a glowing effect at the time of execution. This behavior seems correct for when the entity does not have a glowing effect: the method correctly returns false. However, even when the entity has a glowing effect, the method does not return true, like I expect it would, however it returns false.

      I have tested this behavior via a testing plugin of which the main class's (which is also the only class) source code can be found here: https://pastie.io/iwioud.java and the plugin.yml can be found here: https://pastie.io/vrerml.yml. Note that for testing on 1.14.4 the api-version key in the plugin.yml was set to 1.14 and for testing on 1.13.2 the api-version key in the plugin.yml was set to 1.13. The plugin is also available from the attachments down below as a JAR file. This plugin is made for 1.14.4.

      Using this test plugin, we can observe the behavior I described above by following these steps. Prior to executing these, ensure that the server with the testing plugin is running and a player (the one who will test this behavior) is on the server.

      • Ensure that the player who will be performing these steps has a permission level of 2 or higher. If this is not the case, please make the player op, by running minecraft:op <playername> from the terminal in which the server is running, where <playername> is replaced by the name of the player who will perform these steps.
      • Execute as the player from the in-game chat the following command: /minecraft:effect clear @s.
      • Now execute as the player /testing:test and observe how false will be send to the online players and the terminal, this is correct since the player does not have a glowing effect.
      • Now execute as the player from the in-game chat the following command: /minecraft:effect give @s minecraft:glowing. This will give us a glowing effect.
      • Now execute as the player /testing:test again and observe how false is still sent to the online players and the terminal, despite the executor having a glowing effect.

      This bug occurs on Spigot 1.14.4 (Spigot-94af569-6ddeb98 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)), Spigot 1.13.2 (git-Spigot-1a3504a-e7700ab (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)), CraftBukkit 1.14.4 (git-Bukkit-6ddeb98 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)) and CraftBukkit 1.13.2 (git-Bukkit-e7700ab (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)). Vanilla 1.14.4 and 1.13.2 have not been tested, since these don't contain the Bukkit API.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            stefvanschie Stef van Schie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: