Class BukkitView

java.lang.Object
io.typst.bukkit.view.BukkitView

public class BukkitView extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    openView(ChestView view, org.bukkit.entity.Player player, org.bukkit.plugin.Plugin plugin)
    Open the given view as a new inventory.
    static void
    register(org.bukkit.plugin.Plugin plugin)
     
    static boolean
    updateView(ChestView newView, org.bukkit.entity.Player player)
    Update the inventory to the given items of view.
    static org.bukkit.event.Listener
    viewListener(org.bukkit.plugin.Plugin plugin)
     

    Methods inherited from class java.lang.Object

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

    • BukkitView

      public BukkitView()
  • Method Details

    • openView

      public static void openView(ChestView view, org.bukkit.entity.Player player, org.bukkit.plugin.Plugin plugin)
      Open the given view as a new inventory. This will cause InventoryCloseEvent and InventoryOpenEvent.
    • updateView

      public static boolean updateView(ChestView newView, org.bukkit.entity.Player player)
      Update the inventory to the given items of view. This won't cause InventoryCloseEvent and InventoryOpenEvent. If the new controls overwrite a player accessible slot, then the item will be returned back to player.
      Returns:
      false if the view can't be updated -- the title and size of inventory player seeing is different from the given view; true if success.
    • viewListener

      public static org.bukkit.event.Listener viewListener(org.bukkit.plugin.Plugin plugin)
    • register

      public static void register(org.bukkit.plugin.Plugin plugin)