Skip to content

Commit

Permalink
updated window
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier committed Oct 26, 2023
1 parent 0fd0140 commit 92a0c72
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/main/java/minevalley/smart/api/utils/window/Window.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package minevalley.smart.api.utils.window;

import minevalley.smart.api.User;
import minevalley.smart.api.enums.InterfaceItem;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;

import java.util.List;
import java.util.function.BiConsumer;
Expand All @@ -15,22 +17,32 @@ public interface Window {

Window updateItem(WindowItem guiItem, WindowItem updateItem);

void setItem(int slot, WindowItem guiItem);
Window setItem(int slot, WindowItem guiItem);

void setItem(WindowItem guiItem);
Window setItem(int slot, ItemStack itemStack);

Window setItem(int slot, InterfaceItem item);

Window addItem(WindowItem guiItem);

Window addItem(ItemStack itemStack);

Window addItem(InterfaceItem item);

Window setInterfaceItems(InterfaceItem item, int... slots);

Window setInterfaceItemsInRange(InterfaceItem item, int from, int to);

Window onWindowMinimize(Consumer<User> callback);

void removeItem(WindowItem guiItem);

WindowItem getItem(int slot);

void updateTitle(String title);

void onReturn(Consumer<User> callback);

void onClose(Consumer<User> consumer);

void close();

void moveAllUsersToNextWindow(Window window);

void onSlotClick(int slot, BiConsumer<User, ClickType> callback);
Expand Down

0 comments on commit 92a0c72

Please sign in to comment.