This page will teach you all you need to know about utilizing the Grappling Hook API.

Setting Up

Before you can do anything with the API you need to add the jar file to your project's java build path as with any api.

Listening For Grapple Events

Listening for a grapple event is easy! Just do exactly as you would when listening to a normal Bukkit event.

public void onGrapple(PlayerGrappleEvent event){

Hooking Into The API

Utilizing the Grappling Hook API is extremely simple and straight forward.
First, import this :
import com.snowgears.grapplinghook.api.HookAPI;

Then just call this static method for all Grappling Hook methods:

Click here to see the full API on Github


If I wanted to check if the item in a player's hand was a Grappling Hook, I would do this:

If I wanted to set how many uses someone's grappling hook had to 12, I would do this:
ItemStack grapplingHook = player.getItemInHand();
HookAPI.setUses(grapplingHook, 12);

As you can see, it is very simple to utilize the Grappling Hook API. Hopefully this helps you! If you have any questions feel free to send me a private message or comment on the main page. Good luck coding!