Minestom

This page describes how to integrate Lamp with Minestom, as well as what to expect out of it.

Setting up

Prerequisites

  • Java 21 or newer

Adding Lamp dependency

To add Lamp to your project, add the following (depending on your project structure):

<dependencies>
  <!-- Required for all platforms -->
  <dependency>
      <groupId>io.github.revxrsal</groupId>
      <artifactId>lamp.common</artifactId> 
      <version>[VERSION]</version>
  </dependency>

  <!-- Sponge module -->
  <dependency>
      <groupId>io.github.revxrsal</groupId>
      <artifactId>lamp.minestom</artifactId>
      <version>[VERSION]</version>
  </dependency>  
</dependencies>

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:

Minestom-specific annotations

@CommandPermission

Adds a command permission for the given command

Supported Minestom types

  • net.minestom.server.command.CommandSender and its subclasses in place of CommandActor

  • Player

  • Instance

  • EntityFinder

  • ItemStack

  • Component

  • BinaryTag

  • CompoundBinaryTag

Example

Last updated

Was this helpful?