mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-27 04:30:25 +08:00
Fixed IncompatibleClassChangeError when breaking paintings in 1.21.1 and earlier
This commit is contained in:
parent
2780a9af27
commit
9958d372e3
@ -72,7 +72,12 @@ public final class HangingBreakListener extends Queue implements Listener {
|
||||
material = Material.PAINTING;
|
||||
Painting painting = (Painting) entity;
|
||||
blockData = "FACING=" + painting.getFacing().name();
|
||||
itemData = Util.getArtId(painting.getArt().toString(), true);
|
||||
try {
|
||||
itemData = Util.getArtId(painting.getArt().toString(), true);
|
||||
}
|
||||
catch (IncompatibleClassChangeError e) {
|
||||
// 1.21.2+
|
||||
}
|
||||
}
|
||||
|
||||
if (!event.isCancelled() && Config.getConfig(blockEvent.getWorld()).NATURAL_BREAK) {
|
||||
|
Loading…
Reference in New Issue
Block a user