customrealms / cli

Command line tools for creating and compiling JavaScript Minecraft plugins.
https://customrealms.io
MIT License
9 stars 3 forks source link

Support for `permissions` and `commands` and general code cleanup #2

Closed connerdouglass closed 2 years ago

connerdouglass commented 2 years ago

This change adds support for permissions and commands sections in the package.json file of a CustomRealms plugin project. This information is converted to YAML and inserted to the plugin.yml file in the generated JAR file.

The update also adds a crx yml command that prints the generated plugin.yml file to the standard output, which is useful for debugging issues with permissions and commands.

andriemc commented 2 years ago

Can there be a tutorial on how this works? I cannot seem to get it to work.

it-me-joda commented 2 years ago

@ANDREI12333 I don't know if you still need help with this but I read the source and figured out it's something like this:

package.json

{
  "name": "name-changer",
  ...
  "commands": {
    "name": {
      "Description": "Update your display name",
      "Usage": "/name <name>"
    }
  },
  "dependencies": {
    ...
  }
}

Hope this helps you.