https://github.com/nottamion/commandclip
A Command Framework for Bukkit Plugins
https://github.com/nottamion/commandclip
bukkit bukkit-plugin command-fram minecraft paper-api paper-plugin papermc spigot spigot-api spigot-plugin spigotmc tacos
Last synced: 2 months ago
JSON representation
A Command Framework for Bukkit Plugins
- Host: GitHub
- URL: https://github.com/nottamion/commandclip
- Owner: notTamion
- License: mit
- Created: 2023-11-24T21:17:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-04T15:01:48.000Z (almost 2 years ago)
- Last Synced: 2025-06-15T06:49:26.778Z (4 months ago)
- Topics: bukkit, bukkit-plugin, command-fram, minecraft, paper-api, paper-plugin, papermc, spigot, spigot-api, spigot-plugin, spigotmc, tacos
- Language: Java
- Homepage:
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CommandClip [](https://github.com/notTamion/CommandClip/actions) [](https://central.sonatype.com/artifact/io.github.nottamion/commandclip/overview)
A Command Framework for Bukkit Plugins
## Dependency
##### Gradle
```kotlin
repositories {
mavenCentral()
}dependencies {
compileOnly("io.github.nottamion:commandclip:1.1.0")
}
```##### Maven
```xmlio.github.nottamion
commandclip
1.1.0```
To reduce the file size of your plugin its recommended to let spigot download the framework
for you. This also removes the need to shade the framework into your plugin jar.
##### plugin.yml
```yaml
libraries:
- io.github.nottamion:commandclip:1.1.0
```## Usage
Documentation is currently being built at https://github.com/notTamion/CommandClip/wiki.
For now just take a look at the example below.
Here is an example utilizing basic features:
```java
new BaseCommand("hello", this)
.subCommand(new SubCommand("there")
.executes((commandSender, s, strings) -> {
commandSender.sendMessage(s + " there " + strings[0]);
})
.tabCompletes((commandSender, s, strings) -> strings.length == 1 ? Bukkit.getOnlinePlayers().stream().map(Player::getName).toList(): List.of())
.testArgs((commandSender, s, strings) -> {
if (strings.length != 1)
return "Please provide a valid playername";
if (!Bukkit.getOnlinePlayers().stream().map(player -> player.getName()).toList().contains(strings[0]))
return "Player is not online";
return null;
})
.permission("hello.there", "You aren't allowed to get a Welcome :("))
.alias("hi")
.commandDescription("Welcomes you")
.commandPermission("hello")
.register();
```