File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/main/java/dev/felnull/bettergui/core Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,16 @@ public abstract class GUIPage implements InventoryHolder {
1919 private HashMap <Integer , GUIItem > items = new HashMap <>();
2020
2121 public GUIPage (InventoryGUI gui , String name , int size ) {
22- inventory = Bukkit .createInventory (this , size , name );
22+ this . inventory = Bukkit .createInventory (this , size , name );
2323 this .gui = gui ;
24- listener = new GUIClickListener (this );
24+ this .listener = new GUIClickListener (this );
25+ Bukkit .getPluginManager ().registerEvents (listener , plugin );
26+ }
27+
28+ public GUIPage (InventoryGUI gui , Inventory inv ) {
29+ this .inventory = inv ;
30+ this .gui = gui ;
31+ this .listener = new GUIClickListener (this );
2532 Bukkit .getPluginManager ().registerEvents (listener , plugin );
2633 }
2734
You can’t perform that action at this time.
0 commit comments