Fixed IllegalStateException when modifying containers using FAWE
This commit is contained in:
parent
3cedc69205
commit
026b9ce322
2 changed files with 5 additions and 1 deletions
|
|
@ -26,6 +26,10 @@ public class CoreProtectEditSessionEvent {
|
||||||
return initialized;
|
return initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isFAWE() {
|
||||||
|
return isFAWE;
|
||||||
|
}
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
if (isInitialized()) {
|
if (isInitialized()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class CoreProtectLogger extends AbstractDelegateExtent {
|
||||||
// No clear way to get container content data from within the WorldEdit API
|
// No clear way to get container content data from within the WorldEdit API
|
||||||
// Data may be available by converting oldBlock.toBaseBlock().getNbtData()
|
// Data may be available by converting oldBlock.toBaseBlock().getNbtData()
|
||||||
// e.g. BaseBlock block = eventWorld.getBlock(position);
|
// e.g. BaseBlock block = eventWorld.getBlock(position);
|
||||||
ItemStack[] containerData = Util.getContainerContents(oldType, null, location);
|
ItemStack[] containerData = CoreProtectEditSessionEvent.isFAWE() ? null : Util.getContainerContents(oldType, null, location);
|
||||||
|
|
||||||
if (eventExtent.setBlock(position, block)) {
|
if (eventExtent.setBlock(position, block)) {
|
||||||
WorldEditLogger.postProcess(eventExtent, eventActor, position, location, block, baseBlock, oldType, oldBlock, containerData);
|
WorldEditLogger.postProcess(eventExtent, eventActor, position, location, block, baseBlock, oldType, oldBlock, containerData);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue