Search in sources :

Example 6 with EntityWither

use of net.minecraft.server.v1_14_R1.EntityWither in project Citizens2 by CitizensDev.

the class NMSImpl method setWitherCharged.

@Override
public void setWitherCharged(Wither wither, boolean charged) {
    EntityWither handle = ((CraftWither) wither).getHandle();
    handle.g(charged ? 20 : 0);
}
Also used : CraftWither(org.bukkit.craftbukkit.v1_10_R1.entity.CraftWither) EntityWither(net.minecraft.server.v1_10_R1.EntityWither)

Example 7 with EntityWither

use of net.minecraft.server.v1_14_R1.EntityWither in project Citizens2 by CitizensDev.

the class NMSImpl method getBossBar.

@Override
public BossBar getBossBar(org.bukkit.entity.Entity entity) {
    BossBattleServer bserver = null;
    try {
        if (entity.getType() == EntityType.WITHER) {
            bserver = ((EntityWither) NMSImpl.getHandle(entity)).bossBattle;
        } else if (entity.getType() == EntityType.ENDER_DRAGON) {
            Object battleObject = ENDERDRAGON_BATTLE_FIELD.invoke(NMSImpl.getHandle(entity));
            if (battleObject == null) {
                return null;
            }
            bserver = ((EnderDragonBattle) battleObject).bossBattle;
        }
    } catch (Throwable e) {
        e.printStackTrace();
    }
    if (bserver == null) {
        return null;
    }
    BossBar ret = Bukkit.createBossBar("", BarColor.BLUE, BarStyle.SEGMENTED_10);
    try {
        CRAFT_BOSSBAR_HANDLE_FIELD.invoke(ret, bserver);
    } catch (Throwable e) {
        e.printStackTrace();
    }
    return ret;
}
Also used : EnderDragonBattle(net.minecraft.server.v1_14_R1.EnderDragonBattle) BossBar(org.bukkit.boss.BossBar) CraftBossBar(org.bukkit.craftbukkit.v1_14_R1.boss.CraftBossBar) DataWatcherObject(net.minecraft.server.v1_14_R1.DataWatcherObject) BossBattleServer(net.minecraft.server.v1_14_R1.BossBattleServer)

Example 8 with EntityWither

use of net.minecraft.server.v1_14_R1.EntityWither in project Citizens2 by CitizensDev.

the class NMSImpl method setWitherCharged.

@Override
public void setWitherCharged(Wither wither, boolean charged) {
    EntityWither handle = ((CraftWither) wither).getHandle();
    handle.r(charged ? 20 : 0);
}
Also used : CraftWither(org.bukkit.craftbukkit.v1_14_R1.entity.CraftWither) EntityWither(net.minecraft.server.v1_14_R1.EntityWither)

Example 9 with EntityWither

use of net.minecraft.server.v1_14_R1.EntityWither in project Citizens2 by CitizensDev.

the class NMSImpl method setWitherCharged.

@Override
public void setWitherCharged(Wither wither, boolean charged) {
    EntityWither handle = ((CraftWither) wither).getHandle();
    handle.g(charged ? 20 : 0);
}
Also used : CraftWither(org.bukkit.craftbukkit.v1_12_R1.entity.CraftWither) EntityWither(net.minecraft.server.v1_12_R1.EntityWither)

Aggregations

EntityWither (net.minecraft.server.v1_10_R1.EntityWither)1 EntityWither (net.minecraft.server.v1_11_R1.EntityWither)1 EntityWither (net.minecraft.server.v1_12_R1.EntityWither)1 EntityWither (net.minecraft.server.v1_13_R2.EntityWither)1 BossBattleServer (net.minecraft.server.v1_14_R1.BossBattleServer)1 DataWatcherObject (net.minecraft.server.v1_14_R1.DataWatcherObject)1 EnderDragonBattle (net.minecraft.server.v1_14_R1.EnderDragonBattle)1 EntityWither (net.minecraft.server.v1_14_R1.EntityWither)1 EntityWither (net.minecraft.server.v1_15_R1.EntityWither)1 EntityWither (net.minecraft.server.v1_16_R3.EntityWither)1 EntityWither (net.minecraft.server.v1_8_R3.EntityWither)1 BossBar (org.bukkit.boss.BossBar)1 CraftWither (org.bukkit.craftbukkit.v1_10_R1.entity.CraftWither)1 CraftWither (org.bukkit.craftbukkit.v1_11_R1.entity.CraftWither)1 CraftWither (org.bukkit.craftbukkit.v1_12_R1.entity.CraftWither)1 CraftWither (org.bukkit.craftbukkit.v1_13_R2.entity.CraftWither)1 CraftBossBar (org.bukkit.craftbukkit.v1_14_R1.boss.CraftBossBar)1 CraftWither (org.bukkit.craftbukkit.v1_14_R1.entity.CraftWither)1 CraftWither (org.bukkit.craftbukkit.v1_15_R1.entity.CraftWither)1 CraftWither (org.bukkit.craftbukkit.v1_16_R3.entity.CraftWither)1