Repository navigation
2.4
Changes
-
Code & API Changes
- Moved away from enums. Now using interfaces (
Foo), registries (FooRegistry), creators (FooCreator), parsing factories (Foos)- converted
CommandComponentType - converted
ExecutionType - converted
RequirementType - converted
SuggestionType
- converted
- Made
CustomCommandandCommandSectionrecords. Both now implementCommandSectionLikewith methods for name, children, command component and values. They also no longer haveparentandrootfields as you can not have those and children on an immutable object.
- Moved away from enums. Now using interfaces (
-
Added a plugin command (
/customcommandor/ccmd)- Subcommand
commandgives you the values (permission, description, aliases...) of the command (section) specified after. - Subcommands
commandssends a list of all commands with values into chat.- Subcommand
withonly shows the value entries (permission, description, aliases) specified after for each command.
- Subcommand
- Subcommand
helpsends the description of the command (section) specified after. - Subcommand
reloadRebuilds all commands, registers them using NMS and sends command update packets to all players. - Subcommand
updateIf there is a new update, downloads it after confirmation. It will be applied on the next restart.
- Subcommand
-
All executions except for
javascriptandjavascript_referenceare now wrapped in a section like this to more easily support multi-typing in the future:executes: type: message message: message: '<green>Hello, World!' broadcast: true executes: type: boss_bar boss-bar: name: 'Custom boss bar' progress: 1.0 color: yellow stay-ticks: 100 # 5s
-
Arguments now start with either
literalorargumentinstead ofthenv2.3.1:
then:my-argument: type: LITERAL # or then:my-argument: type: ARGUMENT argument: type: INTEGER
vs. now:
literal:my-argument: # or argument:my-argument: type: integer
-
When one command can't be parsed, now skips only that command instead of the entire file
-
Made Javascript not spam the console
-
Added Javascript variables:
console- the consoleargs- A utility object for getting argumentsget("name")gets the argument with the name. ResolvesArgumentResolvers, so it will return aPlayerinstead of aPlayerSelectorArgumentResolverfor an argument type ofplayer.resolveAngle("name")resolves an angle argument.get("name")already does this.resolveAngle("name", source)allows you to specify a custom source to resolve the angle withresolve("name")resolves the argument.get("name")already does this.resolve("name", source)allows you to specify a custom source
isExecutorEntity- If the executor is an entity. If false, it is a consoleisExecutorConsole- If the executor is a console.executoris unusable (null) if this is true. Use sender in that case.suggestionsUtility object for creating suggestion entries (only in suggestions)string("suggestion")- A string suggestionstring("suggestion", "tooltip")- A string suggestion with tooltip (hover text)integer("suggestion")- An integer suggestioninteger("suggestion", "tooltip")- An integer suggestion with tooltip (hover text)
-
Fixed
javascript_reference -
Updated examples
-
Renamed
commandsexecution type tocommand