Simplify code in the handler for WorldEdit 7

This commit is contained in:
Thijs Wiefferink 2018-12-27 15:00:53 +01:00
parent 93fd4e96cb
commit fa4857cbce
1 changed files with 1 additions and 6 deletions

View File

@ -96,12 +96,7 @@ public class WorldEditHandler7 extends WorldEditInterface {
try(Closer closer = Closer.create()) {
FileInputStream fis = closer.register(new FileInputStream(file));
BufferedInputStream bis = closer.register(new BufferedInputStream(fis));
ClipboardFormat clipboardFormat = ClipboardFormats.findByFile(file);
if (clipboardFormat == null) {
pluginInterface.getLogger().warning("WorldEdit could not detect format type of the schematic file:" + file.getAbsolutePath() + ", try updating WorldEdit");
return false;
}
ClipboardReader reader = clipboardFormat.getReader(bis);
ClipboardReader reader = format.getReader(bis);
//WorldData worldData = world.getWorldData();
LocalSession session = new LocalSession(pluginInterface.getWorldEdit().getLocalConfiguration());