RealMegaMinds / ActionInventoryMod

A fabric Minecraft mod that allows the creation of special inventories that can do certain things when items are clicked.
MIT License
17 stars 3 forks source link

[Feature Request] Player name #10

Closed manashard closed 1 year ago

manashard commented 1 year ago

Is it possible to add some sort custom selector like [player] or {player}? Using @p(proximity) is not suitable in some cases.

[player] selector will be replaced for the player name who clicked An example usage:


"action": {
        "actions": [
          {
            "command": "/give [player] diamond",
            "fromServer": true,
            "type": "Command"
          },
          {
            "type": "CloseGui"
          }
        ],
        "type": "Require"
      },
Hoid2 commented 1 year ago

Does the self selector @s work for this?

manashard commented 1 year ago

Does the self selector @s work for this?

Sadly not work, in some cases selectors are doable but in general passing the name of the clicker is the best option

Hoid2 commented 1 year ago

Version 3.4.0 adds support for PlaceHolder Api. You should be able to use the player name with %player:name%

manashard commented 1 year ago

Version 3.4.0 adds support for PlaceHolder Api. You should be able to use the player name with %player:name%

Thanks