X

NOTICE

Are you sure you want to report this?

A feedback area designed for scripting and mods suggestions and feedback. Please note bug reports and support issues will be removed.

61

New data for datapack : Command (Custom Commands)

5 Comments

Post a new comment:

Please sign in to leave a comment.

  • 0
    Comment actions Permalink

    I like that you can decide if non-OP player can use that command or not.

  • 0
    Dylan Jones commented
    Comment actions Permalink

    Even better than "op" requirement: allow the command to set the "operator level", the 1-4 scale.

  • 0
    Comment actions Permalink

    What would also suit this change is:

    • Scoped variables (allows function/command recursion) instead of global scoreboard
    • String variables (allows string arguments in commands)

     

  • 0
    xBowMatt commented
    Comment actions Permalink
    It's possible ? To do that  ?
  • 0
    Zarkmend ZAN commented
    Comment actions Permalink

    Well, I have an example for getting a local player name:

    `{
    "getlocalplayername": {
    "versions": [
    {
    "description": "commands.getlocalplayername.description",
    "permission": "any",
    "is_hidden": true,

    "overloads": {
    "default": {
    "input": {
    "parameters": []
    },
    "output": {
    "format_strings": [
    {
    "format": "{0}"
    }
    ],
    "parameters": [
    {
    "name": "localplayername",
    "type": "string"
    }
    ]
    }
    }
    }
    }
    ]
    }
    }`
    As you can see here, "format_strings" can be used in text formatting, set the message color and conditions for the message to display. The "permissions" object is more suitable for this. "is_hidden" is included.