What is it?
ActionAPI is a way to perform various different functions/actions using text based operators to complete and run each individual action. This means that as the library grows larger and larger you no longer will need to add implementation into other plugins that are integrated and can rather hook into this instead saving you time.
Due to the fact that this is a rather new API it is limited to begin. Your suggestions and requests will build the API as I will know what you the user would like implemented.
How do I use it?
This is a API built for developers so you can implement these methods in your own code. Any plugin that supports these actions will have access to the entire library of actions. The most appropriate use of actions are for file based requests, by this I mean for any actions/functions you wish to allow a server owner to change via a config or other file. This is the main and most effective use and is how I implemented this into my own plugins.
API:
Below is just an example of how you access the API and execute the action you have prepared for the player.
Code (Text):
public void executeAction(Player player, String action){
ActionAPI.getInstance().getAPI().executeAction(player, action);
//Executes the given action for the player specified
}
ActionAPI.getInstance().getAPI().executeAction(player, action);
//Executes the given action for the player specified
}
Currently ActionAPI has the following actions within the library. Certain actions are dependant on other plugins to execute the given task.
Spoiler: Actions
Code (Text):
[Chance=<percentage>] [<action>] - Chance out of 100% that this action will be performed
[Delay=<time>] [<action>] - Delays the action to be performed after the delay period in seconds
[PlayerCommand] <command> - Executes the command as a player
[ConsoleCommand] <command> - Executes the command as the console
[OperatorCommand] <command> - Executes the command as an operator
[Broadcast] <message> - Broadcasts the following message to the server
[Message] <message> - Sends the following message to the player
[JSONBroadcast] <message> - Sends the JSON message to the server
[JSONMessage] <message> - Sends the JSON message to the player
[Sound] <sound value> - Plays the sound for the player
[VaultGive] <amount> - Adds the amount to the players Vault economy balance
[VaultTake] <amount> - Takes the amount from the players Vault economy balance
[Teleport] <world name>;<x>;<y>;<z> - Teleports the player to the specified coordinates
[Teleport] <world name>;<x>;<y>;<z>;<yaw>;<pitch> - Teleports the player to the specified coordinates
[GiveItem] <material>;<amount> - Gives the player the specified item
[GiveItem] <material>;<amount>;<data> - Gives the player the specified item
[GiveItem] <material>;<amount>;<data>;<name> - Gives the player the specified item
[Title] <title> - Displays the title for the player
[Title] <title>;<subtitle> - Displays the title & subtitle for the player
[ActionBar] <message> - Displays the action bar message for the player
[Bungee] <server> - Sends the player to the specified bungee server
[Delay=<time>] [<action>] - Delays the action to be performed after the delay period in seconds
[PlayerCommand] <command> - Executes the command as a player
[ConsoleCommand] <command> - Executes the command as the console
[OperatorCommand] <command> - Executes the command as an operator
[Broadcast] <message> - Broadcasts the following message to the server
[Message] <message> - Sends the following message to the player
[JSONBroadcast] <message> - Sends the JSON message to the server
[JSONMessage] <message> - Sends the JSON message to the player
[Sound] <sound value> - Plays the sound for the player
[VaultGive] <amount> - Adds the amount to the players Vault economy balance
[VaultTake] <amount> - Takes the amount from the players Vault economy balance
[Teleport] <world name>;<x>;<y>;<z> - Teleports the player to the specified coordinates
[Teleport] <world name>;<x>;<y>;<z>;<yaw>;<pitch> - Teleports the player to the specified coordinates
[GiveItem] <material>;<amount> - Gives the player the specified item
[GiveItem] <material>;<amount>;<data> - Gives the player the specified item
[GiveItem] <material>;<amount>;<data>;<name> - Gives the player the specified item
[Title] <title> - Displays the title for the player
[Title] <title>;<subtitle> - Displays the title & subtitle for the player
[ActionBar] <message> - Displays the action bar message for the player
[Bungee] <server> - Sends the player to the specified bungee server
JavaScript Actions:
You can also use JavaScript in your actions to further enhance what you can do with your rewards and other parts of the plugin.
Objects:
- BukkitPlayer - The player who the action is being executed for
- ActionAPI - The instance of the plugin
Example:
Code (Text):
[ConsoleCommand] eco give %player% [JavaScript=%player_x% * 20]
There are a very limited amount of commands that come with the plugin/API as there isn't really any need for any.
actionapi.admin permission to use any of these commands.
/actionapi help - Displays the help message
/actionapi reload - Reloads the plugin
Suggestions:
If you have any action suggestions from other plugins let me know in the discussions section, and I will get to them as soon as possible (do not tag me).
Full source available on GitHub
Donations:
If you feel that this plugin has helped you in any way and feel like donating to me you can do so by clicking the button below.
License:
Code (Text):
ActionAPI license information
Copyright (c) 2015 Jacob Culley
I retain all rights to this software in binary and its included source code
You are not allowed to redistribute this software in binary or its included source code
You are free to use this software and its API without direct modification to the source code at my discretion.
If you create a resource dependant on this API which is not made available to the public for free, you will provide a free copy to myself (Jacob Culley).
I have the right to block specific plugins from using this API
I have the right to change this license at any time
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
ActionAPI is a free Minecraft Java mod. Downloaded 3,167 times (via Spigot). Download it and open it directly in the game.