A modern annotations-driven commands framework for Java and Kotlin
MIT License
Bot releases are hidden (Show)
Published by Revxrsal 11 months ago
:
.OfflinePlayer
will automatically get the online players for completionsFull Changelog: https://github.com/Revxrsal/Lamp/compare/3.1.7...3.1.8
Published by Revxrsal about 1 year ago
@Optional
)@DefaultFor
now accepts a ~
for parent paths@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: https://github.com/Revxrsal/Lamp/compare/3.1.6...3.1.7
Published by Revxrsal about 1 year ago
null
when they aren't optionalFull Changelog: https://github.com/Revxrsal/Lamp/compare/3.1.5...3.1.6
Published by Revxrsal over 1 year ago
AutoCompleter#filterToClosestInput(boolean)
to customize whether inputs are filtered to match the closest input by default or notPublished by Revxrsal over 1 year ago
ArgumentParser
APIArgumentStack#copy
methods@Default
functionality has been reduced to default parameters only, and is no longer applicable on methods. Use @DefaultFor
insteadCommandActor#dispatch(...)
methods@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) {
...
}
}
Published by Revxrsal over 1 year ago
@DefaultFor
annotationExecutableCommand#execute
methodsPublished by Revxrsal almost 2 years ago
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()
and commandHandler#parseArgumentsForCompletion()
have been deprecated, and are scheduled for removal in v3.1.4. As a replacement, use ArgumentStack#parse()
and ArgumentStack#parseForAutoCompletion()
respectively.@GuildOnly
annotation in JDAPublished by Revxrsal almost 2 years ago
Full Changelog: https://github.com/Revxrsal/Lamp/compare/3.1.0...3.1.1
Published by Revxrsal about 2 years ago
This version implements native Brigadier support on Minecraft 1.19+.
Published by Revxrsal about 2 years ago
Published by Revxrsal over 2 years ago
Published by Revxrsal over 2 years ago
ArgumentTypes
utility for 1.19 supportMinecraftArgumentType
enum for accessing and creating Minecraft's argument typesPublished by Revxrsal over 2 years ago
ktx
module and migrate it to common
BukkitCommandHandler#enableAdventure()
and BukkitCommandHandler#enableAdventure(BukkitAudiences)
BukkitCommandActor#audience()
BukkitCommandActor#reply(ComponentLike)
Audience
as a sender in commandsComponent
s from methods will be sent to the command actorbukkitCommandHandler {}
DSLbrigadier {}
DSLCommandActor.sender
: CommandSender
CommandActor.player
: Player
CommandActor.playerOrNull
: Player?
brigadier.bind<Type>(argumentType)
brigadier.bind<Type>(argumentTypeResolver)
brigadier.bind<Type>(String)
Published by Revxrsal over 2 years ago
CommodoreBukkitBrigadier#getArgumentType
by @Grabsky in https://github.com/Revxrsal/Lamp/pull/25
Published by Revxrsal over 2 years ago
bukkit
's module no longer depends on commodore and instead embeds a stripped-down version of it (to change certain behaviour in it as well)bukkit
's module also no longer depends on the brigadier
module for Brigadier supportPlayer
arguments on 1.13.2+ will now be auto-completed by vanilla, allowing selectors to be used on them directlyArgumentStack
can be used as a parameter type to access the command inputSelfHandlingException
interface for exceptions that wish to immediately handle themselvesPublished by Revxrsal over 2 years ago
Published by Revxrsal over 2 years ago
Warning: This release introduces breaking changes to ArgumentStack
.
CommandHandler.unregisterAllCommands()
@AutoComplete
annotations can now accept *
for a parameter to reference the default auto-completerCommandHandler.getArgumentParser()
, CommandHandler.setArgumentParser(ArgumentParser)
, CommandHandler.parseArguments(String...)
and CommandHandler.parseArgumentsForCompletion(String...)
minecraft:
namespaceArgumentStack changes:
ArgumentStack#of(String...)
ArgumentStack#of(Collection<String>)
ArgumentStack#forAutoCompletion(String...)
ArgumentStack#fromString(String)
ArgumentStack#exactly(Collection<String>
to #copy(Collection<String>)
ArgumentStack#copy(String...)
Published by Revxrsal over 2 years ago
Fix Jitpack issues
Published by Revxrsal over 2 years ago
Full Changelog: https://github.com/Revxrsal/Lamp/compare/3.0.0...3.0.1
Published by Revxrsal over 2 years ago