small fix

This commit is contained in:
Minecon724 2022-01-29 16:09:32 +01:00
parent f4daa14bd5
commit 5cdd686db9
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ public class Main extends JavaPlugin implements Listener {
} }
} }
} }
}.runTaskTimer(this, config.getLong("hitDelay"), 0L); }; //.runTaskTimer(this, config.getLong("hitDelay"), 0L);
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
@ -113,11 +113,11 @@ public class Main extends JavaPlugin implements Listener {
Entity spawnGiant(boolean ai, Location pos) { Entity spawnGiant(boolean ai, Location pos) {
LivingEntity entity = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.GIANT); LivingEntity entity = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.GIANT);
if (ai) { if (ai) {
Entity passenger = pos.getWorld().spawnEntity(pos, EntityType.HUSK); LivingEntity passenger = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.HUSK);
new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1).apply((LivingEntity) passenger); new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1).apply((LivingEntity) passenger);
passenger.setInvulnerable(true);
passenger.setCustomName("Giant"); passenger.setCustomName("Giant");
passenger.setCustomNameVisible(false); passenger.setCustomNameVisible(false);
passenger.setHealth(0.5D);
entity.addPassenger(passenger); entity.addPassenger(passenger);
} }
for (Entry<PotionEffectType, Integer> t : effects.entrySet()) { for (Entry<PotionEffectType, Integer> t : effects.entrySet()) {