dependencies {// Required for all platforms implementation 'io.github.revxrsal:lamp.common:[VERSION]'// Sponge module implementation 'io.github.revxrsal:lamp.sponge:[VERSION]'}
dependencies {// Required for all platformsimplementation("io.github.revxrsal:lamp.common:[VERSION]")// Velocity moduleimplementation("io.github.revxrsal:lamp.sponge:[VERSION]")}
Latest version:
Optional: Preserve parameter names
Lamp identifies parameters by their names and uses them to generate relevant command metadata. By default, Java does not preserve parameter names reflectively. You need to add the following to your project:
compileJava { // Preserve parameter names in the bytecode options.compilerArgs += ["-parameters"]}// optional: if you're using KotlincompileKotlin { kotlinOptions.javaParameters =true}
tasks.withType<JavaCompile> {// Preserve parameter names in the bytecode options.compilerArgs.add("-parameters")}// optional: if you're using Kotlintasks.withType<KotlinJvmCompile> {compilerOptions { javaParameters =true }}
Sponge-specific annotations
@CommandPermission
Adds a command permission for the given command
Supported Sponge types
org.spongepowered.api.command.CommandCause and its subclasses in place of CommandActor
net.kyori.adventure.audience.Audience and its subclasses in place of CommandActor
org.spongepowered.api.service.permission.Subject and its subclasses in place of CommandActor