mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2024-11-16 07:15:23 +01:00
Indicate limits when a MaxChangedBlocksException is thrown by WorldEdit
This commit is contained in:
parent
0950452692
commit
8a7e2ba5c2
@ -41,11 +41,9 @@ public class WorldEditHandler5 extends WorldEditInterface {
|
||||
}
|
||||
clipBoard.place(editSession, origin, false);
|
||||
} catch(MaxChangedBlocksException e) {
|
||||
pluginInterface.getLogger().warning("Exeeded the block limit while restoring schematic of " + regionInterface.getName());
|
||||
pluginInterface.getLogger().warning("Exeeded the block limit while restoring schematic of "+regionInterface.getName()+", limit in exception: "+e.getBlockLimit()+", limit passed by AreaShop: "+pluginInterface.getConfig().getInt("maximumBlocks"));
|
||||
result = false;
|
||||
} catch(DataException e) {
|
||||
otherException = e;
|
||||
} catch(IOException e) {
|
||||
} catch(DataException|IOException e) {
|
||||
otherException = e;
|
||||
}
|
||||
if(otherException != null) {
|
||||
@ -72,9 +70,7 @@ public class WorldEditHandler5 extends WorldEditInterface {
|
||||
Exception otherException = null;
|
||||
try {
|
||||
SchematicFormat.MCEDIT.save(clipboard, file);
|
||||
} catch (DataException e) {
|
||||
otherException = e;
|
||||
} catch (IOException e) {
|
||||
} catch(DataException|IOException e) {
|
||||
otherException = e;
|
||||
}
|
||||
if(otherException != null) {
|
||||
|
@ -74,7 +74,7 @@ public class WorldEditHandler6 extends WorldEditInterface {
|
||||
.build();
|
||||
Operations.completeLegacy(operation);
|
||||
} catch (MaxChangedBlocksException e) {
|
||||
pluginInterface.getLogger().warning("Exeeded the block limit while restoring schematic of " + regionInterface.getName());
|
||||
pluginInterface.getLogger().warning("Exeeded the block limit while restoring schematic of "+regionInterface.getName()+", limit in exception: "+e.getBlockLimit()+", limit passed by AreaShop: "+pluginInterface.getConfig().getInt("maximumBlocks"));
|
||||
return false;
|
||||
} catch (IOException e) {
|
||||
pluginInterface.getLogger().warning("An error occured while restoring schematic of " + regionInterface.getName() + ", enable debug to see the complete stacktrace");
|
||||
@ -108,8 +108,8 @@ public class WorldEditHandler6 extends WorldEditInterface {
|
||||
ForwardExtentCopy copy = new ForwardExtentCopy(editSession, new CuboidRegion(world, regionInterface.getRegion().getMinimumPoint(), regionInterface.getRegion().getMaximumPoint()), clipboard, regionInterface.getRegion().getMinimumPoint());
|
||||
try {
|
||||
Operations.completeLegacy(copy);
|
||||
} catch (MaxChangedBlocksException e1) {
|
||||
pluginInterface.getLogger().warning("Exeeded the block limit while saving schematic of " + regionInterface.getName());
|
||||
} catch(MaxChangedBlocksException e) {
|
||||
pluginInterface.getLogger().warning("Exeeded the block limit while saving schematic of "+regionInterface.getName()+", limit in exception: "+e.getBlockLimit()+", limit passed by AreaShop: "+pluginInterface.getConfig().getInt("maximumBlocks"));
|
||||
return false;
|
||||
}
|
||||
Closer closer = Closer.create();
|
||||
|
Loading…
Reference in New Issue
Block a user