Skip to content

Commit

Permalink
画面外でかつシフトだった場合の処理を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisa9006 committed Nov 16, 2024
1 parent c461e27 commit f1f98ce
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.felnull</groupId>
<artifactId>BetterGUI</artifactId>
<version>1.0.5</version>
<version>1.0.6-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterGUI</name>
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/dev/felnull/bettergui/core/GUIPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,10 @@ public void onOutsideWindowRightClick(InventoryClickEvent e){}
public void onOutsideWindowLeftClick(InventoryClickEvent e){}

public void onOutsideWindowClick(InventoryClickEvent e){}

public void onOutsideWindowRightShiftClick(InventoryClickEvent e){}

public void onOutsideWindowLeftShiftClick(InventoryClickEvent e){}

public void onOutsideWindowShiftClick(InventoryClickEvent e){}
}
12 changes: 12 additions & 0 deletions src/main/java/dev/felnull/bettergui/listener/GUIClickListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ public void onClick(InventoryClickEvent e){
page.onOutsideWindowLeftClick(e);
}
break;
case SHIFT_RIGHT:
if(e.getSlot() == -999){
page.onOutsideWindowShiftClick(e);
page.onOutsideWindowRightShiftClick(e);
}
break;
case SHIFT_LEFT:
if(e.getSlot() == -999){
page.onOutsideWindowShiftClick(e);
page.onOutsideWindowLeftShiftClick(e);
}
break;
}

e.setCancelled(true);
Expand Down

0 comments on commit f1f98ce

Please sign in to comment.