Skip to content

Commit

Permalink
fixed an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoDadone committed Jan 9, 2022
1 parent c676e39 commit c445a83
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions languages/config.spanish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ anchor-item:
level-line: "&fNivel: &e"
other-lines:
- "&fDinero por minuto: &e%moneyPerMinute%"
- "&fMineral: %oreLevel%"

anchor:
title: "&5Anchor - nivel %level%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void onBlockClick(PlayerInteractEvent e) {
Player p = e.getPlayer();
try {
// If the player is sneaking, don't open the inventory.
if(e.getClickedBlock().getType().equals(Material.RESPAWN_ANCHOR) && (p.isSneaking() && e.getAction().equals(Action.RIGHT_CLICK_BLOCK))) {
if(Objects.requireNonNull(e.getClickedBlock()).getType().equals(Material.RESPAWN_ANCHOR) && (p.isSneaking() && e.getAction().equals(Action.RIGHT_CLICK_BLOCK))) {
e.setCancelled(true);
return;
}
Expand All @@ -49,9 +49,7 @@ public void onBlockClick(PlayerInteractEvent e) {
}
}
}
} catch (Exception e1) {
e1.printStackTrace();
}
} catch (Exception ignored) {}
}

private final AnchorSell plugin;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ anchor-item:
level-line: "&fAnchor level: &e"
other-lines:
- "&fMoney per minute: &e%moneyPerMinute%"
- "&fOre level: %oreLevel%"

anchor:
title: "&5Anchor - level %level%"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: AnchorSell
version: 1.5.0
version: 1.5.1
main: mc.nightmarephoenix.anchorsell.AnchorSell
api-version: 1.16
depend: [ Vault, Essentials ]
Expand Down

0 comments on commit c445a83

Please sign in to comment.