top of page

Command Block API

Description

This plugin is for people that don't know how to use java very well, but did learn command blocks.

Minecraft Version: 1.12

Wiki

This is the way you import the api to your code:

Methods:

runCommand(command) - Runs a command.

runCommandAmount(command, amount) - Runs a command a number of time.

runCommandDelay(command, ticks) - Runs a command after an amount of time (in ticks).

runCommands(commands) - Runs an array of commands.

createCommandLoop(commands, ticks) - Runs an array of commands every amount of time infinitely.

runOnJoin(commands) - Runs an array of command when a player joins. You can use <player> to reference the player.

runOnClickWithItem(commands, material) - Runs an array of commands when a player right clicks with an item. You can use <player> to reference the player.

runOnClickOnEntity(commands, entity type) - Runs an array of commands when a player right clicks an entity. You can use <player> to reference the player, You can use <entity> to reference the entity.

runOnEntityDamage(commands, [entity type]) - Runs an array of commands when an entity is getting damaged (Optional to specify the entity type). You can use <entity> to reference the entity.

private CmdBlockAPI api = (CmdBlockAPI) Bukkit.getServer().getPluginManager().getPlugin("CommandBlockAPI");

Dance Till Your Dead!

bottom of page