● Added a bunch of useful API methods for you to be able to access the plugin with
Code (Java):
/** * Get a mine from the name * @param name - The mine name * @return - IMine */ @Nullable
publicstatic IMine getMine
(String name
){ return plugin.
getMineRegistry().
findMine(name
); }
/** * Get a mine from a location * @param location - The location to check * @return - IMine */ publicstatic IMine getMine
(@NonNull
final Location location
){ return plugin.
getMineRegistry().
findMine(location
); }
/** * Get a mine from a location with a radius. * @param centerLocation - Location to check * @param x - X around centerLocation * @param y - Y around centerLocation * @param z - Z around centerLocation * @return IMine */ @Nullable
publicstatic IMine getMine
(@NonNull Location centerLocation,
int x,
int y,
int z
){ return plugin.
getMineRegistry().
findMine(centerLocation, x, y, z
); }
/** * Get a mine from the player. * @param player - Player to check * @return - IMine */ @Nullable
publicstatic IMine getMine
(@NonNull Player player
){ return plugin.
getMineRegistry().
findMine(player
); }
/** * Get the mine region associated with the mine * @param name - Mine name to check * @return - IMineRegion */ public IMineRegion getRegion
(finalString name
){ return getMine
(name
).
getMineData().
getMineRegion(); }
/** * Create a mine with the name and region (top,bottom) * @param name - Name of the mine * @param region - The region of the mine. */ publicstaticvoid createMine
(finalString name, IMineRegion region
){ plugin.
getMineRegistry().
createMine(name, region
); }
/** * Delete a mine with the name * @param name - Name to delete */ publicstaticvoid deleteMine
(finalString name
){ plugin.
getMineRegistry().
deleteMine(name
); }