Search in sources :

Example 1 with NewMinidungeonRelativeBossLocationEvent

use of com.magmaguy.elitemobs.api.internal.NewMinidungeonRelativeBossLocationEvent in project EliteMobs by MagmaGuy.

the class Minidungeon method initializeRelativeLocationAddition.

public boolean initializeRelativeLocationAddition(CustomBossesConfigFields customBossesConfigFields, Location location) {
    Location relativeLocation = addRelativeLocation(customBossesConfigFields, location);
    NewMinidungeonRelativeBossLocationEvent event = new NewMinidungeonRelativeBossLocationEvent(this, relativeLocation, dungeonPackagerConfigFields.getAnchorPoint().clone().add(Objects.requireNonNull(relativeLocation)), customBossesConfigFields);
    new EventCaller(event);
    if (event.isCancelled())
        return false;
    RegionalBossEntity.createPermanentRegionalBossEntity(customBossesConfigFields, location);
    return true;
}
Also used : EventCaller(com.magmaguy.elitemobs.utils.EventCaller) NewMinidungeonRelativeBossLocationEvent(com.magmaguy.elitemobs.api.internal.NewMinidungeonRelativeBossLocationEvent) Location(org.bukkit.Location)

Aggregations

NewMinidungeonRelativeBossLocationEvent (com.magmaguy.elitemobs.api.internal.NewMinidungeonRelativeBossLocationEvent)1 EventCaller (com.magmaguy.elitemobs.utils.EventCaller)1 Location (org.bukkit.Location)1