Releases: Paul2708/simple-commands
JitPack Building Issues
This small update addresses #75. It was not possible to use simple-commands because JitPack uses Java 8 by default. However, simple-command requires Java 14.
Now, it should be again possible to use simple-commands via JitPack as described in the README
.
Thanks for pointing this out, @LittleHillMYR!
Introducing sub commands
This update mainly introduces sub commands.
The @Command
annotation has a new field called parent
. It's a string array that represents the command path.
Note: I didn't have a lot time to test sub commands especially in combination with optional commands. If you find any issues, please report them.
Example usage:
The following code snippet represents the minecraft commands: /warp
, /warp create [name]
, /warp delete [name]
, /warp delete all
.
@Command(name = "warp")
public void warp(Player player) {
// ...
}
@Command(name = "create", parent = {"warp"})
public void create(Player player, String name) {
// ...
}
@Command(name = "delete", parent = {"warp"})
public void delete(Player player, String name) {
// ...
}
@Command(name = "all", parent = {"warp", "delete"})
public void deleteAll(Player player) {
// ...
}
You can get the newest version by JitPack (see readme).
Breaking changes
- default permission changed from
operator
tonone
!
Additions
- permission constants
Command.OP_PERMISSION
andCommand.NONE_PERMISSION
- unit tests for command delegation, matching, optional commands, etc. (cf. test-directory)
- introducing sub commands (cf. #71)
- maven build cache to speedup builds
MapLanguageProvider
to provide messages in-code (thanks to @RealCerus for his contribution)
Fixes
- OP permission check
Bug fixes
This update provides mainly two bug fixes: build issues and @Optional
command annotation.
I got inspired by mela-commands - a general purpose command parsing & executing framework. So check it out as well.
You can get the newest version by JitPack (see readme).
Changes
- dependency updates
- Spigot: from
1.13
to1.15.2
- Java: from
8
to14
- JUnit: from
4
to5
- Spigot: from
Additions
- symbols in message resources
Fixes
Optional arguments and more command arguments
This update adds some new spigot command arguments, fixes some bugs and supports optional command arguments.
Hacktoberfest
According to the Hacktoberfest I want to thank @Stupremee and @romangraef for their (helpful!) contributions. 🎉
Important Changes:
- added
UuidArgument
,EnchantmentArgument
andGameRuleArgument
(by @Stupremee) - optional command argument support with
@Optional
(by @romangraef)
You can find an example here. - (weird defined) enum constants that are not uppercase only get accepted now (covered by unit test)
Other Changes:
- added code of conduct (default one) to improve the project rating (community recommendation)
- fixed
plugin.yml
of example plugin by changing api-version from1.14
to1.13
- added note in contributing guidelines:
Switch to
development
branch bygit checkout development
.
New arguments and bug fixes
This small update adds some new spigot command arguments, fixes some bugs and improves small things.
Hacktoberfest
According to the Hacktoberfest I want to thank @RealCerus for his contribution. 🎉
Important Changes:
- added
World
,Entity
,GameMode
andLocation
argument (implemented by @RealCerus) - added their message resources
- message resources gets encoded in
UTF-8
now (special chars work now) - added contribution guidelines
Other Changes:
- command override works (e.g.
/help
, other bukkit default commands) (by default, no changes made) - command usage contains spaces between the command arguments (e.g.
/test [Int][Int]
->/test [Int] [Int]
) plugin.yml
of Example-Plugin got updated- fixed typos in readme (thanks to @Leon-DE) 👍
Language Update
This small update adds language loading by file to the framework.
Changelog:
- added javadoc-plugin to create javadoc on build
- load resource bundle by file using
LanguageSelector#loadByFile(String)
- Checkstyle will not fail on build any longer (but still on
mvn checkstyle:check
) - updated pull request template and README details
CI/CD Update
This small update contains CI/CD updates.
Travis-CI is used to verify and test the built. JitPack is used to release the newsest jar.
Changelog:
- translate method in language selector
- print usage information instead parameter sizes
- travis support
- checkstyle plugin
- changed spigot dependency from local to remote
First release
This is the first working release, altough the version is 0.2.0.
An example plugin can be found here: https://github.com/Paul2708/simple-commands/tree/master/example