use of net.minecraft.server.v1_13_R2.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.d(charged ? 20 : 0);
}
use of net.minecraft.server.v1_13_R2.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) {
try {
bserver = ((EntityWither) NMSImpl.getHandle(entity)).bossBattle;
} catch (NoSuchFieldError ex) {
bserver = (BossBattleServer) WITHER_BOSS_BAR_FIELD.get(NMSImpl.getHandle(entity));
}
} else if (entity.getType() == EntityType.ENDER_DRAGON) {
try {
bserver = ((EnderDragonBattle) ENDERDRAGON_BATTLE_FIELD.get(NMSImpl.getHandle(entity))).bossBattle;
} catch (NoSuchFieldError ex) {
bserver = (BossBattleServer) ENDERDRAGON_BATTLE_BAR_FIELD.get(ENDERDRAGON_BATTLE_FIELD.get(NMSImpl.getHandle(entity)));
}
}
} catch (Exception e) {
}
if (bserver == null) {
return null;
}
BossBar ret = Bukkit.createBossBar("", BarColor.BLUE, BarStyle.SEGMENTED_10);
try {
CRAFT_BOSSBAR_HANDLE_FIELD.set(ret, bserver);
} catch (Exception e) {
}
return ret;
}
use of net.minecraft.server.v1_13_R2.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.setInvul(charged ? 20 : 0);
}
use of net.minecraft.server.v1_13_R2.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.s(charged ? 20 : 0);
}
use of net.minecraft.server.v1_13_R2.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);
}
Aggregations