mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-02-17 16:39:42 +08:00
Fixed IllegalArgumentException when performing rollbacks on armor stand contents
This commit is contained in:
parent
b96f47cbac
commit
f80c6ab5cd
@ -1107,7 +1107,6 @@ public class Rollback extends Queue {
|
||||
containerType = block.getType();
|
||||
}
|
||||
else if (BlockGroup.CONTAINERS.contains(Material.ARMOR_STAND) || BlockGroup.CONTAINERS.contains(Material.ITEM_FRAME)) {
|
||||
BlockFace blockFace = BlockFace.valueOf(faceData);
|
||||
for (Entity entity : block.getChunk().getEntities()) {
|
||||
if (entity.getLocation().getBlockX() == rowX && entity.getLocation().getBlockY() == rowY && entity.getLocation().getBlockZ() == rowZ) {
|
||||
if (entity instanceof ArmorStand) {
|
||||
@ -1117,7 +1116,7 @@ public class Rollback extends Queue {
|
||||
else if (entity instanceof ItemFrame) {
|
||||
container = entity;
|
||||
containerType = Material.ITEM_FRAME;
|
||||
if (blockFace == ((ItemFrame) entity).getFacing()) {
|
||||
if (faceData.length() > 0 && (BlockFace.valueOf(faceData) == ((ItemFrame) entity).getFacing())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user