// Path: src/main/java/com/graywolf336/jail/interfaces/IJailStickManager.java
// public interface IJailStickManager {
// 	
// 	/**
//      * Gets the {@link Stick jail stick} by the provided {@link Material}, can be null.
//      * 
//      * @param mat of the stick to get
//      * @return The {@link Stick jail stick}
//      */
//     public Stick getStick(Material mat);
//     
//     /**
//      * Checks if the provided Material is a valid {@link Stick jail stick}
//      * 
//      * @param mat the {@link Material} to check
//      * @return whether the provided material is a valid stick
//      */
//     public boolean isValidStick(Material mat);
//     
//     /**
//      * Adds a player to be using a jail stick, with the uuid of the player.
//      * 
//      * @param id of the player to add
//      */
//     public void addUsingStick(UUID id);
//     
//     /**
//      * Removes a player from using a jail stick, with the uuid of the player.
//      * 
//      * @param id of the player to remove using a jail stick
//      */
//     public void removeUsingStick(UUID id);
//     
//     /**
//      * Returns whether or not the player is using a jail stick.
//      * 
//      * @param id of the player to check if using one
//      * @return true if the player is using a jail stick, false if not
//      */
//     public boolean isUsingJailStick(UUID id);
//     
//     /**
//      * Toggles whether the player is using a jail stick, returning the true if enabled false if disabled.
//      * 
//      * @param id of the player to toggle using a stick
//      * @return true if we enabled it, false if we disabled it.
//      */
//     public boolean toggleUsingStick(UUID id);
//     
//     /**  Removes all the users currently using the sticks. */
//     public void removeAllStickUsers();
// }


import com.graywolf336.jail.interfaces.IJailStickManager;
package com.graywolf336.jail;


/**
 * The static api interface for Jail plugin.
 *
 * <p>
 *
 * If you're looking for non-static methods, please see the
 * {@link JailMain} interface.
 *
 * @author graywolf336
 * @version 3.0.0
 * @since 3.0.0
 */
public class JailsAPI {
    private static JailMain pl;

    protected JailsAPI(JailMain plugin) {
        pl = plugin;
    }
    
    /**
     * Returns the build number, it will return <strong>-1</strong> if an errors occurs.
     * 
     * @return the build number of jail or -1 if an error occurred.
     */
    public static int getBuildNumber() {
        String v = pl.getDescription().getVersion();
        String[] split = v.split("-");
        
        try {
            return Integer.parseInt(split[split.length - 1].replace("b", ""));
        }catch(NumberFormatException e) {
            return -1;
        }
    }

    /**
     * The instance of the {@link JailManager} which contains all the jails and in return prisoners.
     *
     * @return instance of the {@link JailManager}
     * @see JailManager
     */
    public static JailManager getJailManager() {
        return pl.getJailManager();
    }

    /**
     * The instance of the {@link PrisonerManager} which handles all the jailing of players.
     *
     * @return instance of the {@link PrisonerManager}
     * @see PrisonerManager
     */
    public static PrisonerManager getPrisonerManager() {
        return pl.getPrisonerManager();
    }

    /**
     * Gets an instance of the {@link IJailStickManager} which handles all the jail sticks.
     *
     * @return an instance of the {@link IJailStickManager}
     * @see IJailStickManager
     */
// Path: src/main/java/com/graywolf336/jail/interfaces/IJailStickManager.java
// public interface IJailStickManager {
// 	
// 	/**
//      * Gets the {@link Stick jail stick} by the provided {@link Material}, can be null.
//      * 
//      * @param mat of the stick to get
//      * @return The {@link Stick jail stick}
//      */
//     public Stick getStick(Material mat);
//     
//     /**
//      * Checks if the provided Material is a valid {@link Stick jail stick}
//      * 
//      * @param mat the {@link Material} to check
//      * @return whether the provided material is a valid stick
//      */
//     public boolean isValidStick(Material mat);
//     
//     /**
//      * Adds a player to be using a jail stick, with the uuid of the player.
//      * 
//      * @param id of the player to add
//      */
//     public void addUsingStick(UUID id);
//     
//     /**
//      * Removes a player from using a jail stick, with the uuid of the player.
//      * 
//      * @param id of the player to remove using a jail stick
//      */
//     public void removeUsingStick(UUID id);
//     
//     /**
//      * Returns whether or not the player is using a jail stick.
//      * 
//      * @param id of the player to check if using one
//      * @return true if the player is using a jail stick, false if not
//      */
//     public boolean isUsingJailStick(UUID id);
//     
//     /**
//      * Toggles whether the player is using a jail stick, returning the true if enabled false if disabled.
//      * 
//      * @param id of the player to toggle using a stick
//      * @return true if we enabled it, false if we disabled it.
//      */
//     public boolean toggleUsingStick(UUID id);
//     
//     /**  Removes all the users currently using the sticks. */
//     public void removeAllStickUsers();
// }


// Path: src/main/java/com/graywolf336/jail/JailsAPI.java
import com.graywolf336.jail.interfaces.IJailStickManager;

package com.graywolf336.jail;


/**
 * The static api interface for Jail plugin.
 *
 * <p>
 *
 * If you're looking for non-static methods, please see the
 * {@link JailMain} interface.
 *
 * @author graywolf336
 * @version 3.0.0
 * @since 3.0.0
 */
public class JailsAPI {
    private static JailMain pl;

    protected JailsAPI(JailMain plugin) {
        pl = plugin;
    }
    
    /**
     * Returns the build number, it will return <strong>-1</strong> if an errors occurs.
     * 
     * @return the build number of jail or -1 if an error occurred.
     */
    public static int getBuildNumber() {
        String v = pl.getDescription().getVersion();
        String[] split = v.split("-");
        
        try {
            return Integer.parseInt(split[split.length - 1].replace("b", ""));
        }catch(NumberFormatException e) {
            return -1;
        }
    }

    /**
     * The instance of the {@link JailManager} which contains all the jails and in return prisoners.
     *
     * @return instance of the {@link JailManager}
     * @see JailManager
     */
    public static JailManager getJailManager() {
        return pl.getJailManager();
    }

    /**
     * The instance of the {@link PrisonerManager} which handles all the jailing of players.
     *
     * @return instance of the {@link PrisonerManager}
     * @see PrisonerManager
     */
    public static PrisonerManager getPrisonerManager() {
        return pl.getPrisonerManager();
    }

    /**
     * Gets an instance of the {@link IJailStickManager} which handles all the jail sticks.
     *
     * @return an instance of the {@link IJailStickManager}
     * @see IJailStickManager
     */
    public static IJailStickManager getJailStickManager() {