LiteCommands
☄️ LiteCommands - Command framework for Velocity, Bukkit, Paper, BungeeCord, Minestom, Sponge, Fabric, JDA and future implementations.
Annotation based command framework for Velocity, Bukkit, Paper, BungeeCord, Minestom, Sponge, Fabric, JDA, TelegramBots and future implementations. The project is written primarily in Java, distributed under the Apache License 2.0 license, first published in 2021. Key topics include: bukkit, chatgpt, discord-bot, fabric, hacktoberfest.
LiteCommands
Annotation based command framework for Velocity, Bukkit, Paper, BungeeCord, Minestom, Sponge, Fabric, JDA, TelegramBots and future implementations.
</div>📌 Helpful links
✨ Features
- Simple Arguments @Arg & Optional arguments @OptionalArg
- Flags - @Flag
- Joiner - @Join remaining arguments into a string
- Literal arguments - @Literal
- @Quoted arguments for
"quoted input!" - Asynchronous commands, argument parsing and completion. @Async
- Context providers - e.g.
@Sender Player,@Context Worldand more - Command shortcuts @Shortcut
- Support for basic types:
int,double,Duration,LocalDateTime,Locationand more! - Support for collection types:
List,Set,TreeSet,Queue, java arrayT[]and many others! - IntelliJ Plugin that provides annotation inspections, syntax highlighting and more!
- Custom annotation validators. (example)
- Programmatic API for creating more dynamic commands. (example)
- Jakarta EE annotation validation. (extension)
- ChatGPT suggestions. (extension)
- Adventure Kyori support. (extension)
- and more! ✨
📦 Platforms
- Velocity
- Bukkit, Spigot, Paper
- Folia (extension) (by Kropsk)
- BungeeCord, Waterfall (by rchomczyk)
- Minestom (by Codestech1)
- Sponge (by BlackBaroness)
- Fabric (by huanmeng_qwq)
- JDA
- TelegramBots (by BlackBaroness)
💡 Command Example
This is an example of /hello <name> <amount> command:
java@Command(name = "hello") @Permission("dev.rollczi.helloworld") public class HelloCommand { @Execute void command(@Sender CommandSender sender, @Arg String name, @Arg int amount) { for (int i = 0; i < amount; i++) { sender.sendMessage("Hello " + name); } } }
Then we need to register the command in plugin main class: (in this case for Bukkit)
javathis.liteCommands = LiteBukkitFactory.builder("example-plugin") .commands(new HelloCommand()) .build();
🚀 Get Started
➕ Add Panda Repository ❤️
ktsmaven("https://repo.panda-lang.org/releases")
xml<repository> <id>panda-repository</id> <url>https://repo.panda-lang.org/releases</url> </repository>
➕ Add LiteCommands to dependencies
ktsimplementation("dev.rollczi:{artifact}:3.11.0")
xml<dependency> <groupId>dev.rollczi</groupId> <artifactId>{artifact}</artifactId> <version>3.11.0</version> </dependency>
<h2> 💖 GitHub Sponsors</h2>⚠️ Replace
{artifact}with platform artifact
Add-parametersflag to your compiler to use all features (read more)
<!-- sponsors --><!-- sponsors -->diff@@ Special thanks to all sponsors for supporting me and my projects! ❤️ @@
🔮 Official IntelliJ Plugin
With LiteCommands plugin, you can easily develop your commands within the IntelliJ IDEA environment.
The plugin provides annotation inspections, tools for creating new command classes, syntax highlighting, code completion,
and other useful features to make your development experience smoother and more efficient. How to install?
🌍 More Examples
➕ Official examples
➕ Plugins that use LiteCommands!
<div> <h2>💖 Thanks for our partners!</h2> <a href="https://www.jetbrains.com/idea/"> <img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg" alt="JetBrains" width="20%"/> </a> <p> <b>JetBrains</b><br> Supports us with a free license for the most intelligent Java IDE - <b><a href="https://www.jetbrains.com/idea/">IntelliJ IDEA Ultimate</a></b> </p> <a href="https://reposilite.com/"> <img src="https://avatars.githubusercontent.com/u/88636591" alt="Reposilite" width="7%"/> </a> <p> <b>Reposilite</b><br> Provides us with a Maven repository for our artifacts - <b><a href="https://repo.panda-lang.org/">Reposilite Repository</a></b> </p> <a href="https://www.yourkit.com/java/profiler/"> <img src="https://www.yourkit.com/images/yklogo.png" alt="YourKit" width="15%"/> </a> <p> <b>YourKit</b><br> Supports us with a innovative and intelligent tools for monitoring and profiling - <b><a href="https://www.yourkit.com/java/profiler/">YourKit Java Profiler</a></b> </p> </div>Contributors
Showing top 12 contributors by commit count.
