Skip to content

Typical Formats

Cervinakuy edited this page Nov 28, 2020 · 7 revisions

This is under construction

Sound

A typical sound section format in configuration files.

  • Sound - the specific sound itself, full list available here
  • Pitch - the sound pitch, allowed values ranging from -1 (deepest pitch) to 2 (highest pitch)
  • Enabled - whether the sound is enabled
Example
Sound:
  Sound: AMBIENCE_THUNDER
  Pitch: 1
  Enabled: true

Commands

A typical command section format in configuration files.

Notes

  • All commands plugin-wide follow the exact same format
  • All commands support PlaceholderAPI placeholders, assuming PlaceholderAPI and its respective expansions are installed
  • All command sections have an unlimited number of commands
  • Commands are run in order of appearance in the list

By default, most, if not all, Commands sections in default configuration files will be set to the following:

Commands: []

This signifies an empty list of commands. To add one, simply create a list following the format 'sender: command'. It is absolutely critical to include ' (single quotes) around an entire command phrase. Without the single quotes, the command will not be run and may cause other unexpected behaviors to occur. Additionally, unlike in Minecraft, commands should not begin with a / (slash).

Prefix sender types

  • console - runs commands from console
  • player - runs commands from the player

Example of a command section

Commands:
- 'console: say Hello, this command is run from the console!'
- 'console: eco give %player% 100'
- 'player: spawn'

The above code would execute /say Hello, this command is run from the console! from the console, followed by /eco give %player% 100 again from the console, and finally /spawn from the player.

Sample usages

Commands can be used to extend KitPvP's reach to integration of other plugins, like some of the following:

  • 'console: eco give %player% 10' - would give the player $10 if Vault is installed
  • 'player: hub' - would teleport the player back to the hub if a hub plugin is installed