Search in sources :

Example 1 with AbstractAreaTriggerManager

use of io.github.wysohn.triggerreactor.core.manager.trigger.AbstractAreaTriggerManager in project TriggerReactor by wysohn.

the class CommonFunctions method currentAreaAt.

/**
 * Get the name of area trigger at the target location.
 * @param location the location to check
 * @return name of area; null if there is no area trigger at location
 */
public String currentAreaAt(Location location) {
    AbstractAreaTriggerManager areaManager = plugin.getAreaManager();
    AreaTriggerManager.AreaTrigger trigger = areaManager.getArea(LocationUtil.convertToSimpleLocation(location));
    if (trigger == null)
        return null;
    return trigger.getTriggerName();
}
Also used : AbstractAreaTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.AbstractAreaTriggerManager) AreaTriggerManager(io.github.wysohn.triggerreactor.bukkit.manager.trigger.AreaTriggerManager) AbstractAreaTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.AbstractAreaTriggerManager)

Aggregations

AreaTriggerManager (io.github.wysohn.triggerreactor.bukkit.manager.trigger.AreaTriggerManager)1 AbstractAreaTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.AbstractAreaTriggerManager)1