πŸ’»API

Access comprehensive documentation for integrating and using the Bloons API.

Maven Dependency Installation

Before using our Bloons API we need to first install the Maven GitHub package dependency. Before using the dependency in your project, please be sure to first authenticate with your personal access token in your project.

Next, you can use the Bloons API in your project by adding the following to your pom.xml file:

<dependencies>
  <dependency>
    <groupId>net.jeqo</groupId>
    <artifactId>bloons</artifactId>
    <version>[version]</version>
  </dependency>
<dependencies/>

Replace [version] with the latest version of the API. At this point in time, the latest version is 2.0.0

Examples

Below, you can find examples of some code to do a multitude of tasks with the Bloons plugin. This ranges from equipping balloons to players to unequipping balloons from players.

Reloading Bloons

This will reload the main config.yml file and all balloon configurations. All language files are automatically refreshed upon the retrieval of values.

// Trigger a custom event upon the reload of the config
BloonsConfigReloadEvent bloonsConfigReloadEvent = new BloonsConfigReloadEvent();
bloonsConfigReloadEvent.callEvent();

// If the event is cancelled, return out of the reload
if (bloonsConfigReloadEvent.isCancelled()) return;

// Reload the main config.yml and its defaults
Bloons.getInstance().reloadConfig();
Bloons.getInstance().getConfig().options().copyDefaults();
Bloons.getInstance().saveDefaultConfig();

// Refresh balloons and their configurations from their respective files
Bloons.getBalloonCore().initialize();

Equipping a Single Balloon

Equipping a single balloon is a simple task to accomplish and can be an effective way to interact with the plugin. Please be sure to handle the removal of previous balloons and the removal of the player from the active balloons map properly.

Unequipping a Single Balloon

Unequipping balloons is a vital part when it comes to the balloon ecosystem. Please be sure to check the validity of the to-be unequipped balloon before moving forward with the removal of it.

Equipping a Multipart Balloon

Equipping a multipart balloon is made easy, all you need to do is specify a balloon ID and a player and you're off!

Unequipping a Multipart Balloon

Unequipping a balloon is a vital part of the plugin, whether the player enters a restricted zone or if you want to reduce the number of players having balloons equipped, this is the part of the API you want to utilize.

Troubleshooting and Support

Having issues with Bloons? Join our community Discord server and leave a message!

Last updated

Was this helpful?