CommandClip 图标

CommandClip

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/commandclip
资源信息

Minecraft 版本: 1.20.4

平台: bukkit paper purpur spigot

标签: library

资源介绍

CommandClip CommandClip Build Status Latest Version

A Command Framework for Bukkit Plugins

Dependency

Gradle
repositories {
    mavenCentral()
}

dependencies {
    compileOnly("io.github.nottamion:commandclip:1.1.0")
}
Maven
<dependency>
    <groupId>io.github.nottamion</groupId>
    <artifactId>commandclip</artifactId>
    <version>1.1.0</version>
</dependency>

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
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:

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();
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Optimized MTR

价格:0 墨喵币
下载量:0

查看详情
Quieter Phantom

价格:0 墨喵币
下载量:0

查看详情
Multi Faceted Force Fields MFFF

价格:0 墨喵币
下载量:0

查看详情
SimpleShop

价格:0 墨喵币
下载量:0

查看详情