Releases: Despical/CommandFramework
Releases · Despical/CommandFramework
v1.5.2
- Added new utility method CommandArguments#sendMessage(Component)
- Fixed the tab completer working twice when there is no completer associated with the command.
Full Changelog: 1.5.13...1.5.2
v1.5.13
- Added a new option to change the fallback prefix of a command (
Command#fallbackPrefix). By default, the fallback prefix is the same name as the plugin name. - Refactor: renamed
me.despical.commandframework.options.Optionto FrameworkOption for clarity. - Updated license headers.
Full Changelog: 1.5.12...1.5.13
v1.5.12
- Fixed an exception occurring if a sub-command is registered without a main command and the main command of the sub-command is tried to executed.
- Now if a sub-command is registered without a main command, the log message will display the full name of the sub-command instead of only displaying the main command's name.
- Replaced the
System#getPropertymethod withBoolean#getBooleanmethod. - Removed the deprecation from
Command#asyncoption unless a new API is introduced.
Full Changelog: 1.5.11...1.5.12
v1.5.11
- Removed the
@Api.Internalannotation from the OptionManager class.
Full Changelog: 1.5.1...1.5.11
v1.5.1
- Added
@Optionand@Flagto parse arguments as an option or flag. - Added 3 new methods to
CommandArgumentsclass.CommandArguments#getOption(String)- Gets the option parsed as an argument, can be null.CommandArguments#findOption(String)- Returns an optional that holds a list of parsed option.CommandArguments#isFlagPresent(String)- Returns true if the specified flag is present in the arguments.- Both option and flag annotations can be used multiple times in a single method.
- Added debug mode.
- Added
@Debugannotation. If a command method is annotated with this annotation, it will only be registered if the debug mode is enabled.
- Added
- Added
Option#DEBUGenum.- Use
CommandFramework#options().enableOption(Option.DEBUG);method to enable debug mode. - Now the default logger will be
DebugLoggerif the debug mode is enabled.
- Use
- Fixed server-side command permissions.
- Use
CommandFramework#optionsmethod to toggle options, other option methods are removed from the main class. - Updated tests for the new option and flag annotations.
Other Changes
- Updated badges in the README.md
- Updated content in the README.md
- Updated some wiki pages, documentation for the new annotations will be added later.
- Fixed GitHub actions instantly failing due to old version.
Full Changelog: 1.5.0...1.5.1
v1.5.0
- Added CommandFramework#getAllCommands method to get all registered commands and sub-commands.
- Fixed CommandFramework#getCommands method duplicates the commands and not contains the sub-commands.
- Now this method only returns the commands.
Full Changelog: 1.4.9...1.5.0
v1.4.9
- Fixed error messages (other than SHORT_ARG_SIZE and LONG_ARG_SIZE) not working in the expected behaviour.
Full Changelog: 1.4.8...1.4.9
1.4.8
- Added new method
CommandArguments#getCommandwhich returnsme.despical.commandframework.annotations.Command.- This method will return
null, if used in a tab completer.
- This method will return
- Added
CommandArguments#checkCooldownmethod to check cooldown in the command method.- This method can stop the execution of command when called.
- Added
CommandFramework#setLoggerandCommandFramework#getLoggermethods to set a different logger. (By default, the logger is instance plugin's logger). - Added
Messageenum to make error message handling in a better way. - Added
CommandArguments#sendMessage(Message)method to directly send messages fromMessageenum. - Moved
CommandFramework#setColorFormattermethod toMessageenum. - Renamed
CommandArguments#getCommandmethod toCommandArguments#getBukkitCommand. - Fixed broken unit tests.
- Updated 90% of the Javadocs.
- Seperated some of the classes into different packages so this update may break your imports.
Full Changelog: 1.4.7...1.4.8
1.4.7
- Now framework won't initialize if the package is not relocated.
How to relocate the default package?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>me.despical.commandframework</pattern>
<shadedPattern>your.package.here</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>Full Changelog: 1.4.6...1.4.7
1.4.6
- Added CommandArguments#getArgument(String, String) method to get argument with a fallback value.
- Updated javadocs of CommandArguments class.
- Updated pom file.
Full Changelog: 1.4.5...1.4.6