From d7c72d5f7587b67e95f611a61c3a173904472c0f Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Tue, 13 Aug 2019 18:10:04 -0400 Subject: [PATCH] Variable renames --- .../plot/object/schematic/Schematic.java | 8 ++++---- .../plotsquared/plot/util/SchematicHandler.java | 14 +++++++------- .../plot/util/block/BasicLocalBlockQueue.java | 1 - .../plot/util/block/DelegateLocalBlockQueue.java | 1 - .../plot/util/block/LocalBlockQueue.java | 4 ---- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java index b67b16b58..e2c222df5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/schematic/Schematic.java @@ -30,8 +30,8 @@ public class Schematic { public boolean setBlock(BlockVector3 position, BaseBlock block) throws WorldEditException { if (clipboard.getRegion().contains(position)) { - BlockVector3 v = position.subtract(clipboard.getRegion().getMinimumPoint()); - clipboard.setBlock(v, block); + BlockVector3 vector3 = position.subtract(clipboard.getRegion().getMinimumPoint()); + clipboard.setBlock(vector3, block); return true; } else { return false; @@ -39,9 +39,9 @@ public class Schematic { } public void save(File file) throws IOException { - try (SpongeSchematicWriter ssw = new SpongeSchematicWriter( + try (SpongeSchematicWriter schematicWriter = new SpongeSchematicWriter( new NBTOutputStream(new FileOutputStream(file)))) { - ssw.write(clipboard); + schematicWriter.write(clipboard); } } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java index 6ce59fe6c..9742ffb98 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/SchematicHandler.java @@ -327,9 +327,9 @@ public abstract class SchematicHandler { public Schematic getSchematic(@NotNull URL url) { try { - ReadableByteChannel rbc = Channels.newChannel(url.openStream()); - InputStream is = Channels.newInputStream(rbc); - return getSchematic(is); + ReadableByteChannel readableByteChannel = Channels.newChannel(url.openStream()); + InputStream inputStream = Channels.newInputStream(readableByteChannel); + return getSchematic(inputStream); } catch (IOException e) { e.printStackTrace(); } @@ -338,15 +338,15 @@ public abstract class SchematicHandler { public Schematic getSchematic(@NotNull InputStream is) { try { - SpongeSchematicReader ssr = + SpongeSchematicReader schematicReader = new SpongeSchematicReader(new NBTInputStream(new GZIPInputStream(is))); - BlockArrayClipboard clip = (BlockArrayClipboard) ssr.read(); + BlockArrayClipboard clip = (BlockArrayClipboard) schematicReader.read(); return new Schematic(clip); } catch (IOException ignored) { try { - MCEditSchematicReader msr = + MCEditSchematicReader schematicReader = new MCEditSchematicReader(new NBTInputStream(new GZIPInputStream(is))); - BlockArrayClipboard clip = (BlockArrayClipboard) msr.read(); + BlockArrayClipboard clip = (BlockArrayClipboard) schematicReader.read(); return new Schematic(clip); } catch (IOException e) { e.printStackTrace(); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java index 6993c3208..6b5d625d7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java @@ -23,7 +23,6 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { private int lastZ = Integer.MIN_VALUE; public BasicLocalBlockQueue(String world) { - super(world); this.world = world; this.modified = System.currentTimeMillis(); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java index 0c797c706..5c2a8fb48 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/DelegateLocalBlockQueue.java @@ -8,7 +8,6 @@ public class DelegateLocalBlockQueue extends LocalBlockQueue { private final LocalBlockQueue parent; public DelegateLocalBlockQueue(LocalBlockQueue parent) { - super(parent == null ? null : parent.getWorld()); this.parent = parent; } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java index 53196966e..852505d74 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/LocalBlockQueue.java @@ -16,10 +16,6 @@ import java.util.Map; public abstract class LocalBlockQueue { - public LocalBlockQueue(String world) { - // Implement this elsewhere - } - public ScopedLocalBlockQueue getForChunk(int x, int z) { int bx = x << 4; int bz = z << 4;