Skip to content

Commit

Permalink
Fix strange sign cast exceptions, fixes #1729
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Mar 13, 2018
1 parent 7e2961c commit 6924e80
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -11,6 +11,7 @@
import net.aufdemrand.denizencore.tags.core.EscapeTags;
import net.aufdemrand.denizencore.utilities.CoreUtilities;
import org.bukkit.Bukkit;
import org.bukkit.block.BlockState;
import org.bukkit.block.Sign;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Expand Down Expand Up @@ -136,7 +137,11 @@ public void onPlayerChangesSign(SignChangeEvent event) {
if (dEntity.isNPC(event.getPlayer())) {
return;
}
Sign sign = (Sign) event.getBlock().getState();
BlockState state = event.getBlock().getState();
if (!(state instanceof Sign)) {
return;
}
Sign sign = (Sign) state;
material = dMaterial.getMaterialFrom(event.getBlock().getType(), event.getBlock().getData());
location = new dLocation(event.getBlock().getLocation());
cuboids = new dList();
Expand Down

0 comments on commit 6924e80

Please sign in to comment.