mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-27 17:37:34 +01:00
Fixed IllegalStateException when modifying containers using FAWE
This commit is contained in:
parent
3cedc69205
commit
026b9ce322
@ -26,6 +26,10 @@ public class CoreProtectEditSessionEvent {
|
||||
return initialized;
|
||||
}
|
||||
|
||||
public static boolean isFAWE() {
|
||||
return isFAWE;
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
if (isInitialized()) {
|
||||
return;
|
||||
|
@ -46,7 +46,7 @@ public class CoreProtectLogger extends AbstractDelegateExtent {
|
||||
// No clear way to get container content data from within the WorldEdit API
|
||||
// Data may be available by converting oldBlock.toBaseBlock().getNbtData()
|
||||
// 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)) {
|
||||
WorldEditLogger.postProcess(eventExtent, eventActor, position, location, block, baseBlock, oldType, oldBlock, containerData);
|
||||
|
Loading…
Reference in New Issue
Block a user