Skip to content

Commit

Permalink
Fix #861 error on cast block to sign
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioZumbi12 committed Jul 24, 2024
1 parent 811ccaa commit 2a952b6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2024 - @FabioZumbi12
* Last Modified: 25/06/2024 02:21
* Last Modified: 24/07/2024 10:58
*
* This class is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any
* damages arising from the use of this class.
Expand Down Expand Up @@ -388,8 +388,7 @@ public void onBlockBreak(BlockBreakEvent e) {
return;
}

if (r != null && r.canBuild(p) && b.getType().name().endsWith("_SIGN")) {
Sign s = (Sign) b.getState();
if (r != null && r.canBuild(p) && b.getState() instanceof Sign s) {
if (s.getSide(Side.FRONT).getLine(0).equalsIgnoreCase("[flag]")) {
RedProtect.get().getConfigManager().removeSign(r.getID(), b.getLocation());
return;
Expand Down

0 comments on commit 2a952b6

Please sign in to comment.