At selectors no longer parsed #173

  • Defect
Assigned to ivanfromitaly
  • L3thalBunny created this issue May 14, 2019

    As of 1.13 @ selectors are no longer automatically parsed before commands are sent to plugins. Therefore each plugin is required to parse it's commands for selectors using the new API before attempting to handle the commands.


    md_5 made an example of said API usage called SelectEverywhere:


    Please implement into MyCommand as many commands that used selectors in MyCmd are now broken.


    MyCmd Custom command:

      command: /greet
      type: RUN_COMMAND
      - '$broadcasttext$&eGreetings $arg1 !!'
      required_args: 1

     Command block:

    /greet @p


    Expected output:

    Greetings L3thalBunny !!

     ACTUAL Output:

    Greetings @p !!


  • L3thalBunny added a tag Defect May 14, 2019
  • L3thalBunny edited description May 14, 2019
  • ivanfromitaly posted a comment May 15, 2019

    I've implemented it in the latest 5.5.0 build. Let me know.

  • ivanfromitaly posted a comment May 16, 2019

    In the latest update i've done to the build i've tryed to make it effective only when the command is of mycommand, but in this case the command block doesn't work. Putting it like that SelectEverywhere will take action on every plugin command. If i find a way to make it works in the commandblock ok, or i'm probably going to remove it.

    Anyway, can't you just put SelectEverywhere.jar inside the plugin folder? It should work fine for every plugin.


  • ivanfromitaly closed issue May 19, 2019
  • ivanfromitaly posted a comment May 19, 2019

    Added in 5.5.0

  • ivanfromitaly self-assigned this issue May 19, 2019
  • L3thalBunny posted a comment May 19, 2019

    Yeah SelectEverywhere adds very basic generic selector support for SINGLE-PERSON/SINGLE-ENTITY selectors. It does not support multiple-entity selectors like the all-players selector @a. I wouldn't worry about trying to handle command blocks, just add support for all MyCmd commands to handle selectors appropriately.


    The command block successfully passes "greet @p" to MyCommand and with SelectEverywhere the @p would result in nearest player BUT, if say command block had "greet @a", SelectEverywhere would do nothing and MyCmd would get one command for "greet @a" instead of multiple commands of "greet {player}" for all players online. MyCmd should recognize the @a or @e and then re-submit the parsed command for all qualified entites.


    I'll update and test next weekend, a little busy this week.

    Edited May 19, 2019
  • ivanfromitaly reopened issue May 19, 2019
  • ivanfromitaly posted a comment May 19, 2019

     @p works for sure, from player and console respectively. So i did nothing, because what i've implemented probably works as the SelectEverywhere.

    Basically @a should work like "executefor: ONLINE_PLAYERS", and run the command for everyone. SelectEverywhere  at the end of the day just replace the placeholder and end there.

  • L3thalBunny posted a comment May 22, 2019

    Tested it on:
    git-Spigot-03bd4b0-342194e (MC: 1.14.1) (Implementing API version 1.14.1-R0.1-SNAPSHOT) (most recent)
    MyCommand: v5.5.0 (most recent)


    No other plugins, clean install.


    Custom Command:

      command: /test
      type: RUN_COMMAND
      - '/tellraw LethalBunni ["your arg: $arg1"]'
      required_args: 1
      register: true

    Command block:

    /test @p

    Expected Output:

    your arg: LethalBunni

    Actual Output:

    your arg: @p

    Command block not working for me :(

    Typing the command manually however DOES work BUT only with @p.. When I had two players online and i tried /test @a output was: "your arg @a"

    Edited May 22, 2019

To post a comment, please login or register a new account.