Search in sources :

Example 6 with CraftRaid

use of org.bukkit.craftbukkit.v1_16_R3.CraftRaid in project LoliServer by Loli-Server.

the class CraftEventFactory method callRaidTriggerEvent.

/**
 * Raid events
 */
public static boolean callRaidTriggerEvent(Raid raid, ServerPlayerEntity player) {
    RaidTriggerEvent event = new RaidTriggerEvent(new CraftRaid(raid), raid.getLevel().getWorld(), player.getBukkitEntity());
    Bukkit.getPluginManager().callEvent(event);
    return !event.isCancelled();
}
Also used : CraftRaid(org.bukkit.craftbukkit.v1_16_R3.CraftRaid) RaidTriggerEvent(org.bukkit.event.raid.RaidTriggerEvent)

Example 7 with CraftRaid

use of org.bukkit.craftbukkit.v1_16_R3.CraftRaid in project LoliServer by Loli-Server.

the class CraftEventFactory method callRaidStopEvent.

public static void callRaidStopEvent(Raid raid, RaidStopEvent.Reason reason) {
    RaidStopEvent event = new RaidStopEvent(new CraftRaid(raid), raid.getLevel().getWorld(), reason);
    Bukkit.getPluginManager().callEvent(event);
}
Also used : CraftRaid(org.bukkit.craftbukkit.v1_16_R3.CraftRaid) RaidStopEvent(org.bukkit.event.raid.RaidStopEvent)

Example 8 with CraftRaid

use of org.bukkit.craftbukkit.v1_16_R3.CraftRaid in project LoliServer by Loli-Server.

the class CraftEventFactory method callRaidFinishEvent.

public static void callRaidFinishEvent(Raid raid, List<Player> players) {
    RaidFinishEvent event = new RaidFinishEvent(new CraftRaid(raid), raid.getLevel().getWorld(), players);
    Bukkit.getPluginManager().callEvent(event);
}
Also used : CraftRaid(org.bukkit.craftbukkit.v1_16_R3.CraftRaid) RaidFinishEvent(org.bukkit.event.raid.RaidFinishEvent)

Aggregations

CraftRaid (org.bukkit.craftbukkit.v1_16_R3.CraftRaid)8 ArrayList (java.util.ArrayList)2 AbstractRaiderEntity (net.minecraft.entity.monster.AbstractRaiderEntity)2 CraftRaider (org.bukkit.craftbukkit.v1_16_R3.entity.CraftRaider)2 RaidFinishEvent (org.bukkit.event.raid.RaidFinishEvent)2 RaidSpawnWaveEvent (org.bukkit.event.raid.RaidSpawnWaveEvent)2 RaidStopEvent (org.bukkit.event.raid.RaidStopEvent)2 RaidTriggerEvent (org.bukkit.event.raid.RaidTriggerEvent)2 Raider (org.bukkit.entity.Raider)1