Project icon ItemCommands
ItemCommands

Run commands with interactions on items

1
3 months ago

ItemCommands

ItemCommands lets item assets trigger server commands through configurable Hytale interactions.

After the plugin starts once, edit the generated file at dev.itsneil.item_commands/ItemCommands.json in the server directory:

{
  "Interactions": [
    {
      "Name": "HealItem",
      "Command": "say The item was used",
      "AsPlayer": true
    },
    {
      "Name": "ConsoleAnnouncement",
      "Command": "say An item was used",
      "AsPlayer": false
    }
  ]
}

Add or remove as many entries as needed. Name is the interaction type referenced by an item asset, Command is the command without or with a leading /, and AsPlayer selects the command sender. Restart the server after changing the configuration.

The plugin registers one stable ItemCommand interaction type, so the Asset Editor does not need a separate asset for every user-configured command. Select ItemCommand and set its Interaction field to any configured Name.

An item can reference an interaction like this:

"Interactions": {
  "Secondary": {
    "Interactions": [
      {
        "Type": "ItemCommand",
        "Interaction": "HealItem"
      }
    ]
  }
}

Creators

4followers
1project
1download

Details

License
Created
Updated
ID
3hO2ZA