Package de.studiocode.invui.window
Class WindowManager
java.lang.Object
de.studiocode.invui.window.WindowManager
- All Implemented Interfaces:
org.bukkit.event.Listener
Manages all
Windows and provides methods for searching them.-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aWindowto the list of windows.static WindowManagerGets theWindowManagerinstance or creates a new one if there isn't one.@Nullable WindowgetOpenWindow(org.bukkit.entity.Player player) Gets theWindowthePlayerhas currently open.Gets a set of all currently openedWindows.@Nullable WindowgetWindow(org.bukkit.inventory.Inventory inventory) Finds theWindowto anInventory.Gets a set of all registeredWindows.voidremoveWindow(Window window) Removes aWindowfrom the list of windows.
-
Method Details
-
getInstance
Gets theWindowManagerinstance or creates a new one if there isn't one.- Returns:
- The
WindowManagerinstance
-
addWindow
- Parameters:
window- TheWindowto add
-
removeWindow
- Parameters:
window- TheWindowto remove
-
getWindow
Finds theWindowto anInventory.- Parameters:
inventory- TheInventory- Returns:
- The
Windowthat belongs to thatInventory
-
getOpenWindow
Gets theWindowthePlayerhas currently open.- Parameters:
player- ThePlayer- Returns:
- The
WindowthePlayerhas currently open
-
getWindows
Gets a set of all registeredWindows.- Returns:
- A set of all
Windows
-
getOpenWindows
Gets a set of all currently openedWindows.- Returns:
- A set of all opened
Windows
-