| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectio.github.alshain01.flags.api.FlagsAPI
public final class FlagsAPI
Primary class for hooking into the API.
| Method Summary | |
|---|---|
| static int | bundleCount()Gets the total number of bundles defined on the server | 
| static boolean | checkAPI(java.lang.String version)Utility method that checks if the provided string represents a version number that is equal to or lower than the current Bukkit API version. | 
| static void | close(io.github.alshain01.flags.DataStore data)Closes the API. | 
| static Area | getAbsoluteAreaAt(org.bukkit.Location location)Gets an area from at a specific location, ignoring inheritance. | 
| static Area | getArea(java.lang.String id)Gets an area by cuboid system specific ID. | 
| static Area | getAreaAt(org.bukkit.Location location)Gets an area from at a specific location. | 
| static AreaPlugin | getAreaPlugin()Gets the currently active cuboid system. | 
| static java.util.Collection<Flag> | getBundle(java.lang.String bundle)Gets a bundle from the data store. | 
| static java.util.Collection<java.lang.String> | getBundleNames()Gets a set of bundle names created on the server. | 
| static Area | getDefaultArea(org.bukkit.World world)Gets the default area for the world. | 
| static Registrar | getRegistrar()Gets the registrar for this instance of Flags. | 
| static SectorManager | getSectorManager()Gets the sector manager for this instance of Flags. | 
| static Area | getWildernessArea(org.bukkit.World world)Gets the wilderness area for the world. | 
| static boolean | hasArea(org.bukkit.Location location)Gets if the configured cuboid system has an area at a specific location. | 
| static void | initialize(org.bukkit.plugin.Plugin plugin,
           AreaPlugin cuboidSystem,
           SectorManager sectors,
           io.github.alshain01.flags.DataStore data)Starts the API. | 
| static boolean | inPvpCombat(org.bukkit.entity.Player player)Checks if a player is in Pvp combat that is being monitored by the cuboid system | 
| static boolean | isBundle(java.lang.String bundle)Checks if a bundle name exists in the data store. | 
| static void | setBundle(java.lang.String name,
          java.util.Collection<Flag> flags)Sets a bundle to the data file. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static void initialize(@Nonnull
                              org.bukkit.plugin.Plugin plugin,
                              @Nonnull
                              AreaPlugin cuboidSystem,
                              @Nullable
                              SectorManager sectors,
                              @Nonnull
                              io.github.alshain01.flags.DataStore data)
cuboidSystem - The cuboid system detecteddata - The datastore to be used
public static void close(@Nonnull
                         io.github.alshain01.flags.DataStore data)
data - The data store to closepublic static AreaPlugin getAreaPlugin()
public static Registrar getRegistrar()
public static SectorManager getSectorManager()
public static Area getDefaultArea(@Nonnull
                                  org.bukkit.World world)
world - The world for which to request the default area.
public static Area getWildernessArea(@Nonnull
                                     org.bukkit.World world)
world - The world for which to request the wilderness area.
public static boolean hasArea(@Nonnull
                              org.bukkit.Location location)
location - The location to request an area.
public static Area getArea(@Nonnull
                           java.lang.String id)
id - The cuboid system specific name of the area or world name
public static Area getAreaAt(@Nonnull
                             org.bukkit.Location location)
location - The location for which to request an area.
public static Area getAbsoluteAreaAt(@Nonnull
                                     org.bukkit.Location location)
location - The location for which to request an area.
public static java.util.Collection<java.lang.String> getBundleNames()
public static int bundleCount()
public static boolean isBundle(@Nonnull
                               java.lang.String bundle)
bundle - A string bundle name.
public static java.util.Collection<Flag> getBundle(@Nonnull
                                                   java.lang.String bundle)
bundle - The bundle name to retrieve
java.lang.IllegalArgumentException
public static void setBundle(@Nonnull
                             java.lang.String name,
                             @Nullable
                             java.util.Collection<Flag> flags)
name - The bundle nameflags - A list of flags in the bundle. May be null to remove the bundle but if not null, may not contain null elements.
java.lang.IllegalArgumentException
public static boolean inPvpCombat(@Nonnull
                                  org.bukkit.entity.Player player)
player - The player to request information for
public static boolean checkAPI(@Nonnull
                               java.lang.String version)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||