Search in sources :

Example 1 with RaidSpawnWaveEvent

use of org.bukkit.event.raid.RaidSpawnWaveEvent in project Mohist by MohistMC.

the class CraftEventFactory method callRaidSpawnWaveEvent.

public static void callRaidSpawnWaveEvent(Raid raid, Raider leader, List<Raider> raiders) {
    org.bukkit.entity.Raider craftLeader = (CraftRaider) leader.getBukkitEntity();
    List<org.bukkit.entity.Raider> craftRaiders = new ArrayList<>();
    for (Raider entityRaider : raiders) {
        craftRaiders.add((org.bukkit.entity.Raider) entityRaider.getBukkitEntity());
    }
    RaidSpawnWaveEvent event = new RaidSpawnWaveEvent(new CraftRaid(raid), raid.getLevel().getWorld(), craftLeader, craftRaiders);
    Bukkit.getPluginManager().callEvent(event);
}
Also used : Raider(net.minecraft.world.entity.raid.Raider) CraftRaider(org.bukkit.craftbukkit.v1_18_R2.entity.CraftRaider) ArrayList(java.util.ArrayList) RaidSpawnWaveEvent(org.bukkit.event.raid.RaidSpawnWaveEvent) CraftRaider(org.bukkit.craftbukkit.v1_18_R2.entity.CraftRaider)

Example 2 with RaidSpawnWaveEvent

use of org.bukkit.event.raid.RaidSpawnWaveEvent in project Magma-1.16.x by magmafoundation.

the class CraftEventFactory method callRaidSpawnWaveEvent.

public static void callRaidSpawnWaveEvent(Raid raid, AbstractRaiderEntity leader, List<AbstractRaiderEntity> raiders) {
    Raider craftLeader = (CraftRaider) leader.getBukkitEntity();
    List<Raider> craftRaiders = new ArrayList<>();
    for (AbstractRaiderEntity entityRaider : raiders) {
        craftRaiders.add((Raider) entityRaider.getBukkitEntity());
    }
    RaidSpawnWaveEvent event = new RaidSpawnWaveEvent(new CraftRaid(raid), raid.getLevel().getWorldCB(), craftLeader, craftRaiders);
    Bukkit.getPluginManager().callEvent(event);
}
Also used : CraftRaider(org.bukkit.craftbukkit.v1_16_R3.entity.CraftRaider) Raider(org.bukkit.entity.Raider) ArrayList(java.util.ArrayList) RaidSpawnWaveEvent(org.bukkit.event.raid.RaidSpawnWaveEvent) CraftRaid(org.bukkit.craftbukkit.v1_16_R3.CraftRaid) CraftRaider(org.bukkit.craftbukkit.v1_16_R3.entity.CraftRaider) AbstractRaiderEntity(net.minecraft.entity.monster.AbstractRaiderEntity)

Example 3 with RaidSpawnWaveEvent

use of org.bukkit.event.raid.RaidSpawnWaveEvent in project LoliServer by Loli-Server.

the class CraftEventFactory method callRaidSpawnWaveEvent.

public static void callRaidSpawnWaveEvent(Raid raid, AbstractRaiderEntity leader, List<AbstractRaiderEntity> raiders) {
    Raider craftLeader = (CraftRaider) leader.getBukkitEntity();
    List<Raider> craftRaiders = new ArrayList<>();
    for (AbstractRaiderEntity entityRaider : raiders) {
        craftRaiders.add((Raider) entityRaider.getBukkitEntity());
    }
    RaidSpawnWaveEvent event = new RaidSpawnWaveEvent(new CraftRaid(raid), raid.getLevel().getWorld(), craftLeader, craftRaiders);
    Bukkit.getPluginManager().callEvent(event);
}
Also used : CraftRaider(org.bukkit.craftbukkit.v1_16_R3.entity.CraftRaider) ArrayList(java.util.ArrayList) RaidSpawnWaveEvent(org.bukkit.event.raid.RaidSpawnWaveEvent) CraftRaid(org.bukkit.craftbukkit.v1_16_R3.CraftRaid) CraftRaider(org.bukkit.craftbukkit.v1_16_R3.entity.CraftRaider) AbstractRaiderEntity(net.minecraft.entity.monster.AbstractRaiderEntity)

Aggregations

ArrayList (java.util.ArrayList)3 RaidSpawnWaveEvent (org.bukkit.event.raid.RaidSpawnWaveEvent)3 AbstractRaiderEntity (net.minecraft.entity.monster.AbstractRaiderEntity)2 CraftRaid (org.bukkit.craftbukkit.v1_16_R3.CraftRaid)2 CraftRaider (org.bukkit.craftbukkit.v1_16_R3.entity.CraftRaider)2 Raider (net.minecraft.world.entity.raid.Raider)1 CraftRaider (org.bukkit.craftbukkit.v1_18_R2.entity.CraftRaider)1 Raider (org.bukkit.entity.Raider)1