-
Notifications
You must be signed in to change notification settings - Fork 49
Creating an ability
- With every kit created using
/kp create
, there is anAbility
section at the bottom of each kit file - At the moment, only one ability may be created per kit, but in the future will support an unlimited amount
- The ability supports sending a custom message, playing a sound, giving potion effects, or running commands
In order for the plugin to distinguish which items are ability items, you must specify the exact item details to detect for, which are the item name and an item type:
Activator:
Name: '&aAbility Item'
Item: EMERALD
You must also include an item in the kit which has the matching name and item type, like so:
Inventory:
(...)
8:
Name: '&aAbility Item'
Item: EMERALD
Amount: 5
To give more uses for an ability item, all you have to do is specify an amount in the kit item. In the above example, the ability item amount given is 5, which allows the player to use it 5 times. After each use, the item automatically decreases its amount in the inventory.
-
Message
is a message that is sent to the player upon use -
Sound
is a sound that is played to the player upon use, list of sounds can be found on the Wiki home page -
Potions
are the potion effects given to the player upon use, which supports using vanilla potion effect names -
Commands
are the commands run upon use, following the same commands format as used in the rest of the plugin with customizable console & players commands with support for PlaceholderAPI placeholders
Since custom abilities have been added, numerous users have been asking how to create abilities such as flying, climbing walls, or copying ones from popular servers. Such abilities are not possible without hard-coding them, or making them individually. However, using the Commands
section of an ability, you can execute a command that triggers an external plugin that either you or a hired developer can code. This is perfectly possible, and unfortunately the only way to implement "special" abilities into the plugin.