Skip to content

适用于 Minecraft 1.21.1, 1.21 的 CommandAPI 插件

一个用于Minecraft 1.13引入的命令UI的API

起价 CommandAPI
次下载
1 次下载
次浏览
28 次浏览
已更新
已更新 26.09.2026

关于 CommandAPI 插件

## An API to use the command UI introduced in Minecraft 1.13

Everything you'll ever need can be found on the GitHub page

What is the CommandAPI?

The CommandAPI provides full support for the new command UI which was implemented in Minecraft's 1.13 update.

Wanna stay up to date? We've got a Discord server!

Brief overview of features

  • Better commands - Prevent players from running invalid commands, making it easier for developers
  • Better arguments - Automatic argument parsing with built-in validation
  • Support for proxied command senders - Run your command as other entities using /execute as ... run command
  • Support for the /execute command - Let your command to be executed by the built in /execute command
  • Support for Minecraft's functions - Allow your command to be executed from Minecraft's functions and tags
  • No plugin.yml registration - Commands don't need to be registered in the plugin.yml file anymore
  • No other dependencies - You don't need to import Brigadier in your projects to use the CommandAPI
  • No tracking - The CommandAPI doesn't collect any stats about its plugin; what you see is what you get!

Argument type casting

Instead of checking if an argument is an integer after they run the command like this:

onCommand(CommandSender sender, Command command, String label, String[] args) { try { int i = Integer.parseInt(args[0]); // Do something with this number catch (NumberFormatException e) { // Do something with the fact this isn't a number... } }

You can rest assured that the CommandAPI has inferred whatever type you want and can jump straight to this:

new CommandAPICommand("mycommand") .withArguments(new IntegerArgument("myint")) .executes((sender, args) -> { int i = (int) args.get("myint"); // Do something with this number }) .register();

The CommandAPI offers over 40 different arguments to tailor to your needs! Automatic casting to Enchantments, EntityTypes, Locations, ItemStacks, PotionEffects and many more!

CommandSender type checks

Never again will you have to check if your sender is a player! The CommandAPI provides automatic command sender checks for all sorts of command senders:

new CommandAPICommand("mycommand") .withArguments(arguments) .executesPlayer((player, args) -> { player.sendMessage("Hi " + player.getDisplayName()); }) .register();

Documentation

The latest documentation can be found here. Trust me, you've never, ever seen documentation this good before.

Built-in plugin converter

Bummed that your plugin's commands can't be used with the /execute command and don't know how to write code? The CommandAPI has you covered! With its built-in plugin command conversion system, you can make any plugin command compatible with Minecraft's /execute command and datapacks!

Still not convinced?

Here's what else it can do:

  • Parse integers with ranges automatically (force your command to only accept values within a range)
  • Handle integer and floating point locations, as well as relative locations using the ~ symbol
  • Parse raw JSON and convert it straight into a BaseComponent[]
  • Parse online players, with suggestions based on who's online
  • Create custom arguments that parse Strings into custom defined objects
  • Apply permissions to specific arguments - you need permissions to even see the suggested arguments as well as run it
  • Make other plugins that weren't written with the CommandAPI compatible with the /execute command
  • Handle results and successes of commands just like you can with command blocks
  • Set context-aware suggestions based on what the user has already entered into their command prompt

Need I say more?

如何安装 CommandAPI

  1. A server on Paper

    The plugin runs on the server core for Minecraft 1.20.6–26.3; players do not need to install anything.

  2. File goes into the plugins folder

    Download the file CommandAPI-12.1.0-Paper.jar (643 KB) and put it into the server’s plugins folder.

  3. Restart the server

    On startup the plugin creates its own settings folder in plugins.

  4. Use the “To server” button

    On Millida Hosting, the button at the top of the page uploads the file to your server and restarts it for you.

版本

含依赖项

Minecraft加载器文件日期操作
26.3Paper26.3643 KB 1
1.21.11Paper1.21.11670 KB—

常见问题

Which Minecraft versions does CommandAPI work on?

There are files for 1.20.6–26.3, 18 versions in total. The newest is 26.3.

Do players need to install CommandAPI?

No, the plugin goes only on the server Paper, into the plugins folder: players do not need to download anything.

Where can I download CommandAPI safely?

On this page: the file CommandAPI-12.1.0-Paper.jar (643 KB) is stored on Millida’s server, with no link shorteners. SHA-1 checksum: 681b03f2d419ef5d99978b9b94e02b93653ba475.

评价

成为第一个评价 CommandAPI 的人

评论 0

登录后即可评论登录

相似插件

全部插件

了解更多

作者: CommandAPI许可证: MIT

您是作者吗? 联系我们 —— 我们将在 48 小时内下架。