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

targetting @e not possible from datapack function

XMLWordPrintable

    • CraftBukkit version git-Spigot-83d9d09-3e5fe3e (MC: 1.13-pre7) (Implementing API version 1.13-pre7-R0.1-SNAPSHOT)

      Targetting @e directly from a function run via #minecraft:tick does not appear to work in spigot, but does in vanilla.

      function with the following commands in:

      execute as @a run say I'm a player
      execute as @p run say I'm a close player
      execute as @e run say I'm an entity
      execute as @r run say I'm random
      execute as @s run say I'm a tick!
      

      Will output something like the following in spigot

      [18:55:28] [Server thread/INFO]: [Zedwick] I'm a player
      [18:55:28] [Server thread/INFO]: [Dax23333] I'm a player
      [18:55:28] [Server thread/INFO]: [Dax23333] I'm a close player
      [18:55:28] [Server thread/INFO]: [Zedwick] I'm random
      

      and something like the following in vanilla (singleplayer)

      [18:02:31] [Client thread/INFO]: [CHAT] [Zedwick] I'm a player
      [18:02:31] [Client thread/INFO]: [CHAT] [Zedwick] I'm a close player
      [18:02:31] [Client thread/INFO]: [CHAT] [Bat] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Creeper] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Bat] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Zombie] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Zombie] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Creeper] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Skeleton] I'm an entity
      [18:02:31] [Client thread/INFO]: [CHAT] [Zedwick] I'm random
      

      if the function or commands are ran by a player in chat, or in a command block, in spigot/vanilla it will output as expected in the vanilla sample above (with the addition of the running player saying "I'm a tick!")

      Test datapack provided, will spam chat with output as it is set to run on minecraft:tick.

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

              Created:
              Updated:
              Resolved: