Solved ASkyBlock Implementation?

Discussion in 'Spigot Plugin Development' started by Fluddershy, May 2, 2017.

  1. Hello, I recently came across an error, but enough about that, let's get to what I need done. I need to use ASkyBlock to check if the player is a Co-Op or owner of the island in the event. I can't make an ASkyBlockEvent using PlayerInteractEvent. I came up with an object to get all the methods, but there's non like s#getPlayer()#getIsland(). If you have any knowledge on using it, please help me, thanks :)
    This is how I made my object
    Code (Text):
    ASkyBlock s = (ASkyBlock) new ASkyBlock();
     
  2. Always good to take a look at the github page from the project ;)
    https://github.com/tastybento/askyb...om/wasteofplastic/askyblock/ASkyBlockAPI.java

    Basically you could call it with

    Code (Text):

    Location anyIslandLocation = player.getLocation();
    UUID ownerUUID = ASkyBlockAPI.getInstance().getOwner(anyIslandLocation);
     
     
    • Agree Agree x 1
  3. maldahleh

    Wiki Team

    You can't just make a new instance of the main class, if you really wanted access to the plugin use the API or Bukkit.getPluginManager().getPlugin("ASkyBlock") and cast it to ASkyBlock.
     
  4. Haha, sorry guys, I thought that was the way to do it. Thanks, I'll keep this in mind when I use other APIs ^o^