Releases: Despical/CommandFramework
Releases · Despical/CommandFramework
1.3.4
1.3.4 Release Notes
- Now aliases supports more or less arguments then actual command length.
- Fixed methods without annotated Cooldown annotation throws exception.
Newly Supported Behaviours
// min - max values are supported for both
// arguments are now splitting dynamically
@Command(
name = "test1",
aliases = {"testAlias", "alias.1", "alias.1.2", "alias.2.3"}
)
public void testCommand_1(CommandArguments arguments) {
arguments.sendMessage("Test message.");
}
@Command(
name = "test2",
aliases = {"randomAlias", "another.alias.arg1.arg2"}
)
public void testCommand_2(CommandArguments arguments) {
arguments.sendMessage("Test message.");
}
Full Changelog: 1.3.3...1.3.4
1.3.3
1.3.3 Release Notes
- Added new cooldown system, see Cooldown annotation.
- Now registering command aliases as a plugin command, if they have head command and are sub-commands then they'll be registered as a sub-command.
- Separated
SHORT_OR_LONG_ARG_SIZE
intoSHORT_ARG_SIZE
andLONG_ARG_SIZE
variables. - Fixed
knownCommands
field not found. - Removed
CommandFramework#unregisterCommands(Object)
method.
Example Command with Cooldown Annotation
@Command(
name = "test"
)
@Cooldown(
cooldown = 10,
timeUnit = TimeUnit.SECONDS, // default is seconds
bypassPerm = "cooldown.bypass",
overrideConsole = true
)
public void testCommand(CommandArguments arguments) {
arguments.sendMessage("Test message.");
}
Full Changelog: 1.3.2...1.3.3
1.3.2
1.3.2 Release Notes
- Added support for sub-command aliases.
- Now framework allows users to create sub-commands without creating main command.
Supported Behaviours
@Command(
name = "test0",
aliases = {"cmdName", "name0.randomArg0"} // both will be registered
)
public void test0(CommandArguments arguments) {}
@Command(
name = "test1.arg1",
aliases = {"oneWord", "name.randomArg1"} // only second one will be registered
)
public void test1(CommandArguments arguments) {}
Full Changelog: 1.3.1...1.3.2
1.3.1
1.3.1 Release Notes
- Now CommandFramework#addCustomParameter function will check for types at compile-time.
Full Changelog: 1.3.0...1.3.1
1.3.0
1.3.0 Release Notes
- Added support for custom command parameters.
- Fixed CommandFramework#unregisterCommands method registering all matched name commands without checking if command is registered from Command Framework's instance plugin.
Additional Changes
- Added JUnit tests for new API feature.
- Added license header to JUnit tests.
- Updated license headers.
Checked exceptions are replaced with an unchecked exception (CommandException from Command Framework).
Full Changelog: 1.2.9...1.3.0
1.2.9
1.2.9 Release Notes
- Added @NoCommandArguments annotation to run commands and tab completers without passing
CommandArguments
parameter. - Added JUnit tests for @NoCommandArguments.
- Updated command examples and wiki page.
Additioal Changes
- Command#async option is now deprecated (will be removed in future updates). New API will be introduced for asynchronous programming.
- Skipped 1.2.7 & 1.2.8 updates
Full Changelog: 1.2.6...1.2.9
1.2.6
1.2.6 Release Notes:
- Fixed sub-commands can not be registered.
- Now if a sub-command is getting tried to register and doesn't have a main command an exception will be thrown after unregistering those commands.
Full Changelog: 1.2.5...1.2.6
1.2.5
1.2.5 Release Notes:
- Added Command#async option to execute commands in a separate thread.
- By default, commands will execute in the main thread.
Developers should be careful while enabling the async option because Bukkit API is not thread safe nor guranteed to be thread safe.
Full Changelog: 1.2.4...1.2.5
1.2.4
1.2.4 Release Notes:
- Added
CommandFramework#getSubCommands
method to get a copy of registered subcommands. - Added
Command#onlyOp
option to allow only op players to execute target command. - Fixed (#8)
CommandMap#getKnownCommands
is not available in legacy versions.
Huge thanks to @gamerover98 for their reports and contributions
Full Changelog: 1.2.3...1.2.4
1.2.3
1.2.3 Release Notes:
- Enabled remaning tests.
- Skipped tests prevent compiler errors on JitPack.
Special thanks to @gamerover98 for their contributions with tests.
What's Changed
- Updated paper-api to 1.20.1 and added MockBukkit test suites by @gamerover98 in #6
New Contributors
- @gamerover98 made their first contribution in #6
Full Changelog: 1.2.2...1.2.3