xCommands icon

xCommands -----

Create custom commands with great versatility and JSON support !



Conditions and Cooldowns
I've added conditions now! Every subcommand can have it's own set of conditions that the player has to meet. To start there are 5 conditions:
  • cost - Checks if a player has enough in their balance, requires Vault
  • isOp - Checks if the player is op
  • permission - Checks if a player has a specific permission
  • xp - Checks if the player has enough xp points
  • xpLevel - Checks if the player has enough xp levels
If you want any other conditions to be added, please put it in the discussion tab and I'll try to get to it as quick as I can !

Here's an example of how these can be added to your commands:
Code (YAML):
 youtube:
    tabComplete
: true
    default
:
      text
:
       - ' [ "", { "text": "» ", "bold":true, "color": "dark_gray" }, { "text": "Click ", "color": "red", "clickEvent": { "action": "open_url", "value": "https://youtube.com/" } }, { "text": "to open my ", "color": "gray", "clickEvent": { "action": "open_url", "value": "https://youtube.com/" } }, { "text": "Youtube", "bold":true, "color": "red", "clickEvent": { "action": "open_url", "value": "https://youtube.com/" } } ]'
      commands
: [ ]
      conditions
:
        cost
:
          value
: 5
          failureMessage
: ' [ "", { "text": "» ", "bold":true, "color": "dark_gray" }, { "text": "You need $5 to run that command", "italic":true, "color": "red" } ]'
        permission
:
          value
: 'some.permission'
          failureMessage
: ' [ "", { "text": "» ", "bold":true, "color": "dark_gray" }, { "text": "You dont have permission to do that.", "italic":true, "color": "red" } ]'
Along with this, I've added a new cooldown feature, where you can add a cooldown to you command if you want. The value is in milliseconds so 1 second of cooldown is 1000ms, heres an example:

Code (YAML):
enabled : true
name
: 'socials'

# effects whether your text will be processed as json or just as a string
json
: true

# permission node for your command, please set to 'none' if you dont need one
permission
: 'xcommands.command.socials'

# how often can someone use this command (in milliseconds)
cooldown
: 10000

# ban or only allow this command in certain worlds
worldWhiteList
:
 - "world"
worldBlackList
: [ ]
If you have any feature request or bug reports, leave it in the discussion and I'll get back to you as soon as i can.
----------, Oct 22, 2023
Resource Information
Author:
----------
Total Downloads: 251
First Release: Oct 22, 2023
Last Update: Jan 13, 2024
Category: ---------------
All-Time Rating:
4 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings