zAPI | Advanced Integrated API for Plugins icon

zAPI | Advanced Integrated API for Plugins -----

Advanced Integrated API for Plugins



A Bukkit/Spigot API to simplify usage of command and rank / chat formatting.

Installation:

zAPI can be built easily, but requires copies of the Spigot server jars to be present locally on your machine in order to be compatible with any Minecraft version. zAPI is built using the Maven build tool - if you don't have it, you can download it here.

You can either
  • Clone the repository using your preferred method, or with the command below:

    git clone https://github.com/ziuee/zAPI.git

  • Go into the folder named zAPI, from there you want the folder which contains pom.xml.

  • Run the pom using mvn

  • Grab then the created JAR file and add it to your maven project.
Or
  • Download the jar
  • Grab then the downloaded JAR file and add it to your maven project.
Documentation:
Simple command registration

Code (Text):
public void registerCommands() {
    new CommandManager(this);
    new FlyCommand(this);
}
Simple fly command
Code (Text):
public class FlyCommand extends BaseCommand {

    @Command(name = "fly", permission = "zapi.fly")
    @Override
    public void onCommand(CommandArgs commandArgs) {
        Player player = commandArgs.getPlayer();

        if (player.getAllowFlight()) {
            player.setAllowFlight(false);
            player.setFlying(false);
            player.updateInventory();
            player.sendMessage(CC.RED + "You are no longer flying.");
        } else {
            player.setAllowFlight(true);
            player.setFlying(true);
            player.updateInventory();
            player.sendMessage(CC.GREEN + "You are now flying.");
        }
    }
}
Resource Information
Author:
----------
Total Downloads: 88
First Release: Feb 22, 2022
Last Update: Feb 22, 2022
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings