Class EnderChestAnimator

java.lang.Object
com.enhancedechest.gui.EnderChestAnimator

public final class EnderChestAnimator extends Object
Triggers the vanilla ender chest open/close lid animation and sound. Uses the pure Paper API (Lidded) — no NMS, no reflection. Lidded#open() / Lidded#close() send the vanilla BlockAction to nearby clients (animating the lid) and play the open/close sound, exactly like a real chest. Needed because the plugin opens a custom GUI inventory instead of the real ender chest inventory, so vanilla never animates the block on its own. Silently degrades (no-op) if the block is missing/not an ender chest, or if the running server build doesn't expose Lidded on ender chests. Thread requirement: must be called on the region thread that owns the block's chunk (Folia) or the main thread (Paper). Callers already dispatch via runAtLocation.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    close(org.bukkit.entity.Player player, org.bukkit.Location blockLoc)
    Plays the close animation and sound on the ender chest at blockLoc.
    static void
    open(org.bukkit.entity.Player player, org.bukkit.Location blockLoc)
    Plays the open animation and sound on the ender chest at blockLoc.

    Methods inherited from class java.lang.Object

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

    • open

      public static void open(org.bukkit.entity.Player player, org.bukkit.Location blockLoc)
      Plays the open animation and sound on the ender chest at blockLoc. Call this when the player opens the custom GUI via block right-click.
    • close

      public static void close(org.bukkit.entity.Player player, org.bukkit.Location blockLoc)
      Plays the close animation and sound on the ender chest at blockLoc. Call this when the player closes the custom GUI.