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

Permission problem when advancements trigger functions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • Latest Spigot 1.12 build (build at time of reporting) running without plugins to rule out 3rd party influences. Running on FreeBSD with latest OpenJDK8.

      I set up an advancement which rewards the player with experience and also triggers a function. The function consists of a '/give @s' command (it gives the player an item).

      When a regular player triggers the advancement then they receive error messages, the same kind you get when a player tries a command which they cannot use ("I'm sorry, but you do not have permission..."). I tracked this down to the function which apparently gets trigged with the player credentials. When the advancement is triggered for an op then everything works as expected.

      It doesn't matter how the advancement is triggered (either by using an actual trigger, or through use of a command block); as soon as specific commands are used in the function then the system gives out an error.

      The reason I consider this a major bug (other than "it works as expected in vanilla") is because this behavior is highly inconsistent:

      I set up a command block which contains: "function catslair:rewards/portal"; when a player triggers this they get their item.

      I set up an advancement which contains '"function": "catslair:rewards/portal"' and a command block to trigger the advancement (contains "advancement grant @p only catslair:portal") and when a player triggers this it fails.

      I attached the advancement & function to make testing this a little easier.

       

            Unassigned Unassigned
            ShelLuser ShelLuser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: