Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blvckbytes/bukkitcommands
https://github.com/blvckbytes/bukkitcommands
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/blvckbytes/bukkitcommands
- Owner: BlvckBytes
- License: mit
- Created: 2023-03-07T14:38:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T10:59:23.000Z (about 1 year ago)
- Last Synced: 2023-11-02T10:35:17.820Z (about 1 year ago)
- Language: Java
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README-X.md
- License: LICENSE
Awesome Lists containing this project
README
# BukkitCommands
A simple bukkit command library which offers boilerplate code as well as configuration sections
for fully configurable commands and messages as well as error handling.## Command Section
```yaml
my_command:
# Main name of the command
name: 'my-command'
# Description printed in the vanilla help menu
description: 'my fancy command'
# "Secondary names" of the command
aliases:
- mycmd
- myc
# A map, assigning a usage to the parameter (index starting at 1) that's causing trouble
# This can be used to print usage messages with - for example - highlighted arguments
argumentUsages:
1$: '"&7/" & alias & " &c &7"'
2$: '"&7/" & alias & " &7 &c"'
# Error messages used for various cases
# All of the following properties have at least this environment:
# value: String? - Current argument value, or null if there's no argument present
# alias: String - Alias used to invoke this command, can be the main name
# sender_name: String - Name of the command sender
errorMessages:
# An argument of type double has been malformed
malformedDouble$: '"&7The value &c" & value & " &7is not a valid &cdouble"'
# An argument of type float has been malformed
malformedFloat$: '"&7The value &c" & value & " &7is not a valid &cfloat"'
# An argument of type long has been malformed
malformedLong$: '"&7The value &c" & value & " &7is not a valid &clong"'
# An argument of type integer has been malformed
malformedInteger$: '"&7The value &c" & value & " &7is not a valid &cinteger"'
# An argument of type UUID-V4 has been malformed
malformedUuid$: '"&7The value &c" & value & " &7is not a valid &cUUID"'
# An argument which can only take on certain pre-defined values has been malformed
# constant_names: List - Available values to choose from
malformedEnum$: |
"&7The value &c" & value & " &7is not one of (" &
iter_cat(constant_names, (constant_name) => "&c" & constant_name, "&7, ", "&cNo values available") &
"&7)"
# This command is only available for players, but has been invoked by the console
notAPlayer: '&7This command can only be executed as a &cplayer'
# An argument which had to be the name of a known player had an invalid value
playerUnknown$: '"&7The player &c" & value & " &7has &cnot played &7on this server before"'
# An argument which had to be the name of a online player had an invalid value
playerNotOnline$: '"&7The player &c" & value & " &7is &cnot online"'
# Any other, internal error occurred
internalError: '&4An internal error occurred'
```