mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
Fixed goldPouch GUI bug
This commit is contained in:
parent
dfcb97d3c8
commit
40ae82cae9
@ -12,7 +12,6 @@ public class InventoryClickContext {
|
||||
private final ClickType clickType;
|
||||
|
||||
private final Cancellable event;
|
||||
|
||||
private Inventory inv;
|
||||
|
||||
public InventoryClickContext(int slot, ItemStack itemStack, ClickType clickType, Cancellable event) {
|
||||
@ -22,6 +21,14 @@ public class InventoryClickContext {
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
public InventoryClickContext(int slot, ItemStack itemStack, ClickType clickType, Cancellable event, Inventory inv) {
|
||||
this.slot = slot;
|
||||
this.itemStack = itemStack;
|
||||
this.clickType = clickType;
|
||||
this.event = event;
|
||||
this.inv = inv;
|
||||
}
|
||||
|
||||
public void setCancelled(boolean val) {
|
||||
event.setCancelled(val);
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ public class PlayerListener implements Listener {
|
||||
@EventHandler
|
||||
public void b(InventoryClickEvent event) {
|
||||
if (event.getInventory().getHolder() instanceof PluginInventory && event.getCurrentItem() != null && event.getCurrentItem().getItemMeta() != null)
|
||||
((PluginInventory) event.getInventory().getHolder()).whenClicked(new InventoryClickContext(event.getRawSlot(), event.getCurrentItem(), event.getClick(), event));
|
||||
((PluginInventory) event.getInventory().getHolder())
|
||||
.whenClicked(new InventoryClickContext(event.getRawSlot(), event.getCurrentItem(), event.getClick(), event,event.getInventory()));
|
||||
}
|
||||
|
||||
// Register custom inventory close effect
|
||||
|
Loading…
Reference in New Issue
Block a user