Releases: Revxrsal/Lamp
Releases · Revxrsal/Lamp
Lamp v3.1.7
- Support for Kotlin's default arguments 🎉 (they must use
@Optional
) @DefaultFor
now accepts a~
for parent paths- Removed
@Optional#def()
@Optional
is now allowed on primitive types, in which case they will use the default primitive value (zero for numbers, false for booleans, etc.)
Full Changelog: 3.1.6...3.1.7
Lamp v3.1.6
- Fixed Brigadier numerical and boolean arguments not working
- Fixed Brigadier commands showing the Unknow command message when they are missing an argument
- Fixed the EntitySelector not showing suggestions
- Fixed parameters sometimes getting
null
when they aren't optional - JDA slash commands by @bivashy 🎉
- Sponge 8 by @creatorfromhell 🎉
- OfflinePlayer fixes
What's Changed
- OfflinePlayer resolver by @SrBlecaute01 in #54
- Bump JDA version 4.4.0_352 -> 5.0.0-beta.9 by @bivashy in #55
- JDA Slash commands support. Backward compatible by @bivashy in #62
- Properly handle DefaultFor in JDA Slash commands by @bivashy in #63
- Call JDAActor#checkInGuild only if this is required. by @bivashy in #68
- Add support of '@default' and '@optional' to JDA Slash commands by @bivashy in #65
- Sponge 8 Base Support. by @creatorfromhell in #67
- Support for JDA slash commands by @Revxrsal in #69
New Contributors
- @SrBlecaute01 made their first contribution in #54
- @creatorfromhell made their first contribution in #67
Full Changelog: 3.1.5...3.1.6
Lamp v3.1.5
- Allow commands to be defined and customized in the plugin.yml
- New API: ParameterNamingStrategy
- Add
AutoCompleter#filterToClosestInput(boolean)
to customize whether inputs are filtered to match the closest input by default or not - Fix a small issue in commodore classloading
Lamp v3.1.4
- Scheduled removal of the
ArgumentParser
API - Scheduled removal of the
ArgumentStack#copy
methods @Default
functionality has been reduced to default parameters only, and is no longer applicable on methods. Use@DefaultFor
instead- Added
CommandActor#dispatch(...)
methods - Code cleanups
Migrating
@Default
has been replaced by @DefaultFor
, which requires explicitly supplying the path to be the default action for. For example:
@Command("foo")
public class FooCommand {
@Subcommand("help") // The main path is /foo help <page>
@DefaultFor("foo") // <--- We can run /foo <page> and /foo help <page> and
// get the same result
public void help(CommandActor actor, @Default("1") int page) {
...
}
}
Lamp v3.1.3
- Fix a few bugs in
@DefaultFor
annotation - Added
ExecutableCommand#execute
methods - Categories will now throw exceptions if they have more than one default action
- Minor improvements and cleanups
Lamp v3.1.2
- Introduce DefaultFor to better express and control the default action logic
- Optional now takes a
def()
property for the default value, as a full replacement to@Default
. @NotSender
will automatically be inferred on arguments that have certain annotations which explicitly imply that the argument is not a sender (for example,@Optional Player
, or@Switch("p") Player
clearly mean this is a parameter and not a sender).ArgumentParser
has been deprecated, and scheduled for removal in v3.1.4commandHandler#parseArguments()
andcommandHandler#parseArgumentsForCompletion()
have been deprecated, and are scheduled for removal in v3.1.4. As a replacement, useArgumentStack#parse()
andArgumentStack#parseForAutoCompletion()
respectively.- Consecutive spaces will not be ignored, and will be parsed just like normal arguments. This is to get functionality as similar to Brigadier as possible, and adhere to the common standards in command execution frameworks.
- Added functionality to
@GuildOnly
annotation in JDA - Documented annotations in JDA
Flag parameter fixes, player completion fixed, Italian translations
- Fixed flag parameters getting incorrect type in Brigadier
- Fixed player suggestions being half-broken when Brigadier is supported
- Added BukkitBrigadier#disableNativePlayerCompletion() to disable native player completions on Brigadier
- Italian translation by @HornMCPE
- Minor optimizations to Brigadier node parser
Full Changelog: 3.1.0...3.1.1
Full Brigadier implementation on 1.19+, new Either type, bug fixes
This version implements native Brigadier support on Minecraft 1.19+.
- Players can't see commands they don't have access to
- Certain parameter errors (such as ranges) that are handled by Brigadier will receive Brigadier errors, just like normal Minecraft commands
- Commands are handled entirely by brigadier now. So unknown subcommands will receive Brigadier errors.
- ArgumentTypeResolvers are no longer bound to types
- New Either type 🎉
- Code cleanups
- Brigadier cleanup
Brigadier on 1.19.1+, minor fixes
- Adds support to Brigadier on Minecraft 1.19.1+ (Paper only)
- Minor permission fixes with auto-completion
Update category permissions
- Fix a small issue in category permissions