Hi ! I've now added even more conditions and 2 other types of cooldown !
Here are the 5 new conditions:
There's also a new option called deduct (not required, defaults to true) added inside of the following conditions:
- cost, health, hunger, xp, xpLevel
This allows you to decide if you want the player to lose the amount specified. Here's an example using the cost condition:
Code (YAML):
conditions:
cost:
value
: 5
deduct
: true
failureMessage
: '
[
"",
{
"text":
"» ",
"bold":true,
"color":
"dark_gray"
},
{
"text":
"You need $5 to run that command",
"italic":true,
"color":
"red"
}
]'
The new condition 'papi' allows you to take any papi placeholder you have installed and check it against whatever value you want (input as string in config). Here's an example of how this condition works within your command config:
Code (YAML):
conditions:
papi:
papi
: '
%player_allow_flight%'
value
: '
yes'
failureMessage
: '
[
"",
{
"text":
"» ",
"bold":true,
"color":
"dark_gray"
},
{
"text":
"You must be able to fly to use this command",
"italic":true,
"color":
"red"
}
]'
On top of this there is now a new cooldown option at the top of your config ! Its called 'globalCooldown', this allows you to have a server-wide cooldown which stops all players from using a command for however long you specify (in milliseconds, 1000ms = 1s)
Code (YAML):
# how often anyone can use this command (in milliseconds)
globalCooldown
: 5000
I've added an extra functionality to the commands section of your subcommand, you now have the option to run them as the player and not just the console. Here's how to do it:
Code (YAML):
commands
:
- 'give
%player% diamond 1'
- '
[player
] help'
Along with this there have been a few bug fixes and QOL changes:
- A message in console will appear telling you what fields you're missing in your command's config file
- Fixed a bug where it couldn't read numbers without a decimal place
- Removed message for when there's no update found
Thank you for reading ! Put it in the discussion tab if you have any bugs or suggestions
