Class SingleBalloon

java.lang.Object
org.bukkit.scheduler.BukkitRunnable
net.jeqo.bloons.balloon.single.SingleBalloon
All Implemented Interfaces:
Runnable

public class SingleBalloon extends org.bukkit.scheduler.BukkitRunnable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    org.bukkit.entity.Chicken
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SingleBalloon(org.bukkit.entity.Player player, String balloonID)
    Constructor for the SingleBalloon class
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels the current bukkit runnable instance and kills off the entities
    static void
    checkBalloonRemovalOrAdd(org.bukkit.entity.Player player, String balloonID)
    Checks if a balloon needs to be removed or added
    org.bukkit.inventory.ItemStack
    Retrieves the item stack object of the visual appearance of the balloon
    void
    Initializes the balloon's armor stand entity with the proper configurations
    void
    Initializes the balloon's lead to the player (chicken entity)
    void
    run()
    What runs inside the extended bukkit runnable, it's the control center of the core functionality of how the balloon moves
    void
    Spawns the particle effect when the balloon is removed

    Methods inherited from class org.bukkit.scheduler.BukkitRunnable

    getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • chicken

      public org.bukkit.entity.Chicken chicken
  • Constructor Details

    • SingleBalloon

      public SingleBalloon(org.bukkit.entity.Player player, String balloonID)
      Constructor for the SingleBalloon class
      Parameters:
      player - The player to attach the balloon to, type org.bukkit.entity.Player
      balloonID - The ID of the balloon to attach to the player, type java.lang.String
  • Method Details

    • initializeBalloonArmorStand

      public void initializeBalloonArmorStand()
      Initializes the balloon's armor stand entity with the proper configurations
    • initializeBalloonLead

      public void initializeBalloonLead()
      Initializes the balloon's lead to the player (chicken entity)
    • run

      public void run()
      What runs inside the extended bukkit runnable, it's the control center of the core functionality of how the balloon moves
    • cancel

      public void cancel() throws IllegalStateException
      Cancels the current bukkit runnable instance and kills off the entities
      Overrides:
      cancel in class org.bukkit.scheduler.BukkitRunnable
      Throws:
      IllegalStateException - If the task has already been cancelled
    • spawnRemoveParticle

      public void spawnRemoveParticle()
      Spawns the particle effect when the balloon is removed
    • getConfiguredBalloonVisual

      public org.bukkit.inventory.ItemStack getConfiguredBalloonVisual(String balloonID)
      Retrieves the item stack object of the visual appearance of the balloon
      Parameters:
      balloonID - The balloon ID to get the visual appearance of, type java.lang.String
      Returns:
      The item object that contains the configured balloon model, returns a barrier if there is an issue, type org.bukkit.inventory.ItemStack
    • checkBalloonRemovalOrAdd

      public static void checkBalloonRemovalOrAdd(org.bukkit.entity.Player player, String balloonID)
      Checks if a balloon needs to be removed or added
      Parameters:
      player - The player to check, type org.bukkit.entity.Player
      balloonID - The balloon ID to check, type java.lang.String