Package io.typst.bukkit.view
Class BukkitView
java.lang.Object
io.typst.bukkit.view.BukkitView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidOpen the given view as a new inventory.static voidregister(org.bukkit.plugin.Plugin plugin) static booleanupdateView(ChestView newView, org.bukkit.entity.Player player) Update the inventory to the given items of view.static org.bukkit.event.ListenerviewListener(org.bukkit.plugin.Plugin plugin)
-
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
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)
-