Class Skywhale

java.lang.Object
io.github.addoncommunity.galactifun.api.aliens.Alien<org.bukkit.entity.Phantom>
io.github.addoncommunity.galactifun.base.aliens.Skywhale

public final class Skywhale extends Alien<org.bukkit.entity.Phantom>
Class for the slywhale, a passive alien of Titan
  • Constructor Details

    • Skywhale

      public Skywhale(@Nonnull String id, @Nonnull String name, double maxHealth, int spawnChance)
  • Method Details

    • onSpawn

      public void onSpawn(@Nonnull org.bukkit.entity.Phantom spawned)
      Overrides:
      onSpawn in class Alien<org.bukkit.entity.Phantom>
    • onTarget

      public void onTarget(@Nonnull org.bukkit.event.entity.EntityTargetEvent e)
      Overrides:
      onTarget in class Alien<org.bukkit.entity.Phantom>
    • onDeath

      public void onDeath(@Nonnull org.bukkit.event.entity.EntityDeathEvent e)
      Overrides:
      onDeath in class Alien<org.bukkit.entity.Phantom>
    • onInteract

      public void onInteract(@Nonnull org.bukkit.event.player.PlayerInteractEntityEvent e)
      Overrides:
      onInteract in class Alien<org.bukkit.entity.Phantom>
    • canSpawnInLightLevel

      protected boolean canSpawnInLightLevel(int lightLevel)
      Description copied from class: Alien
      This method returns whether the alien can spawn in the given light level. By default uses the Zombie light level conditions
      Overrides:
      canSpawnInLightLevel in class Alien<org.bukkit.entity.Phantom>
      Parameters:
      lightLevel - the light level of the block the alien is attempting to spawn on
      Returns:
      true if the alien can spawn in this light level, false otherwise
    • getSpawnHeightOffset

      protected double getSpawnHeightOffset()
      Overrides:
      getSpawnHeightOffset in class Alien<org.bukkit.entity.Phantom>