Skip to content

Commit

Permalink
Fixed EventException: null
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowCrafter011 committed Dec 13, 2021
1 parent 293691b commit bdd09a3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public void onInventoryClick(InventoryClickEvent e) {

int num = -1;
String number = e.getCurrentItem().getItemMeta().getDisplayName().replace("§2Buy option ", "");
num = Integer.parseInt(number) - 1;
try {
num = Integer.parseInt(number) - 1;
}catch (Exception x) {return;};

if (num == -1) {
p.sendMessage(Err.SOMETHING_WENT_WRONG);
Expand Down

0 comments on commit bdd09a3

Please sign in to comment.