ActionAPI 1.0.7

A useful API that allows developers to perform actions and commands with ease.

  1. JC_Plays_MC
    Action API Logo Large.png

    [​IMG]

    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
        }
    Actions:
    Currently ActionAPI has the following actions within the library. Certain actions are dependant on other plugins to execute the given task.

    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

    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]
    Commands:
    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).

    [​IMG]
    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.

    [​IMG]

    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

Recent Updates

  1. Sync Action Bug Fix
  2. 1.11 Support
  3. SyncTask Action

Recent Reviews

  1. Draggonetti
    Draggonetti
    5/5,
    Version: 1.0.7
    Excelent plugin! the possibilities are endless!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  2. AlexiMaria
    AlexiMaria
    2/5,
    Version: 1.0.7
    [18:59:37 ERROR]: Could not pass event PlayerItemConsumeEvent to BarGamble v1.0.0
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.EntityLiving.v(EntityLiving.java:2391) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.EntityPlayer.v(EntityPlayer.java:1058) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.EntityLiving.cI(EntityLiving.java:2308) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.EntityLiving.B_(EntityLiving.java:1872) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.EntityHuman.B_(EntityHuman.java:145) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.EntityPlayer.playerTick(EntityPlayer.java:313) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.PlayerConnection.e(PlayerConnection.java:139) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:233) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:140) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:845) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
    Caused by: java.lang.NullPointerException
    at me.jacobculley.actionapi.action.Action.runAction(Action.java:265) ~[?:?]
    at me.jacobculley.actionapi.action.Action.executeAction(Action.java:89) ~[?:?]
    at com.pixelcraftmc.bargamble.listener.PlayerItemConsume.onPlayerItemConsume(PlayerItemConsume.java:46) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65]
    ... 17 more
    1. JC_Plays_MC
      Author's Response
      Your passing an invalid action to the API.
  3. TheFreeAfk1
    TheFreeAfk1
    5/5,
    Version: 1.0.7
    So good plugin!AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  4. Emboleon1
    Emboleon1
    5/5,
    Version: 1.0.7
    Amazing Plugin, real beauty seeing what devs can do. If I have the money, I'll definitely buy a premium resource. <3
    1. JC_Plays_MC
      Author's Response
      Thanks for the review, glad you like it :)
  5. 24763
    24763
    5/5,
    Version: 1.0.4
    This API seems really awesome and may actually use myself, ignore the TotalInsanity kid he is just a troll who has nothing to do. I have also purchased JC's other resources and have asked for support and has had amazing straight forward messages without any attitude. Well done JC! :)
    1. JC_Plays_MC
      Author's Response
      Thanks, hope to see others have a good use for it :)
  6. BourneDev
    BourneDev
    5/5,
    Version: 1.0.3
    Cause the other guy is such an idiot, i'm gonna rate this 5 stars cause it doesn't deserve this horrible rating. Whats wrong with this guy XD
    1. JC_Plays_MC
      Author's Response
      Thanks <3
  7. TotalInsanity
    TotalInsanity
    1/5,
    Version: 1.0.3
    Yep, another 1 star plugin from another 1 star developer. Loves to talk smack to his downloaders / buyers (even on paid plugins), and has a real attitude problem. Not to mention his plugins are garbage.
    1. JC_Plays_MC
      Author's Response
      Umm alright? You didn't even mention this plugin or why you're giving it a 1 star review... Also I've never even talked to you before, and I don't believe you've purchased any of my premium resources.