From e94c1d4874f5d959ccdad4ebe979c8b1e38ac4bc Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 18 Feb 2011 15:49:50 -0800 Subject: [PATCH] Cleaned up documentation, added lacking Java annotations. --- .../PermissionsResolverServerListener.java | 2 + .../util/commands/CommandsManager.java | 4 +- src/com/sk89q/util/StringUtil.java | 2 +- src/com/sk89q/worldedit/BlockVector.java | 16 +- src/com/sk89q/worldedit/BlockVector2D.java | 9 +- src/com/sk89q/worldedit/BlockWorldVector.java | 22 ++- src/com/sk89q/worldedit/Countable.java | 1 + src/com/sk89q/worldedit/CuboidClipboard.java | 4 +- src/com/sk89q/worldedit/DoubleArrayList.java | 14 +- src/com/sk89q/worldedit/EditSession.java | 28 ++- src/com/sk89q/worldedit/LocalWorld.java | 176 ++++++++++++------ src/com/sk89q/worldedit/LogFormat.java | 1 + src/com/sk89q/worldedit/Vector.java | 10 +- src/com/sk89q/worldedit/Vector2D.java | 3 +- src/com/sk89q/worldedit/WorldVector.java | 7 + src/com/sk89q/worldedit/bags/BlockBag.java | 4 +- src/com/sk89q/worldedit/blocks/BaseBlock.java | 1 + src/com/sk89q/worldedit/blocks/BaseItem.java | 1 + .../sk89q/worldedit/blocks/BaseItemStack.java | 3 + src/com/sk89q/worldedit/blocks/BlockType.java | 1 - .../sk89q/worldedit/blocks/ChestBlock.java | 2 - .../worldedit/blocks/ContainerBlock.java | 4 +- .../worldedit/blocks/DispenserBlock.java | 2 - .../sk89q/worldedit/blocks/FurnaceBlock.java | 6 +- .../worldedit/blocks/MobSpawnerBlock.java | 4 +- src/com/sk89q/worldedit/blocks/NoteBlock.java | 3 +- src/com/sk89q/worldedit/blocks/SignBlock.java | 11 +- .../bukkit/BukkitPlayerBlockBag.java | 8 +- .../bukkit/WorldEditBlockListener.java | 2 + .../sk89q/worldedit/data/AlphaChunkStore.java | 1 + src/com/sk89q/worldedit/data/Chunk.java | 5 +- src/com/sk89q/worldedit/data/ChunkStore.java | 5 +- .../worldedit/data/NestedFileChunkStore.java | 2 +- .../data/TrueZipAlphaChunkStore.java | 1 + .../data/TrueZipLegacyAlphaChunkStore.java | 7 +- .../worldedit/data/ZippedAlphaChunkStore.java | 7 +- src/com/sk89q/worldedit/masks/Mask.java | 1 + .../worldedit/patterns/ClipboardPattern.java | 2 +- .../worldedit/patterns/RandomFillPattern.java | 2 +- .../patterns/SingleBlockPattern.java | 2 +- .../scripting/CraftScriptContext.java | 5 +- .../scripting/RhinoContextFactory.java | 3 + .../sk89q/worldedit/snapshots/Snapshot.java | 4 +- .../snapshots/SnapshotRepository.java | 2 +- .../worldedit/snapshots/SnapshotRestore.java | 3 +- .../worldedit/tools/brushes/BrushShape.java | 2 +- .../sk89q/worldedit/util/FileDialogUtil.java | 2 + .../util/PropertiesConfiguration.java | 1 + .../sk89q/worldedit/util/TreeGenerator.java | 1 - 49 files changed, 269 insertions(+), 140 deletions(-) diff --git a/src/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java b/src/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java index b870c6500..a5672d935 100644 --- a/src/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java +++ b/src/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java @@ -37,6 +37,7 @@ public class PermissionsResolverServerListener extends ServerListener { * * @param event Relevant event details */ + @Override public void onPluginEnabled(PluginEvent event) { String name = event.getPlugin().getDescription().getName(); @@ -50,6 +51,7 @@ public class PermissionsResolverServerListener extends ServerListener { * * @param event Relevant event details */ + @Override public void onPluginDisabled(PluginEvent event) { String name = event.getPlugin().getDescription().getName(); diff --git a/src/com/sk89q/minecraft/util/commands/CommandsManager.java b/src/com/sk89q/minecraft/util/commands/CommandsManager.java index 95368feb2..c3deb80fe 100644 --- a/src/com/sk89q/minecraft/util/commands/CommandsManager.java +++ b/src/com/sk89q/minecraft/util/commands/CommandsManager.java @@ -204,6 +204,7 @@ public class CommandsManager { * @param player * @param methodArgs * @return + * @throws Throwable */ public boolean execute(String[] args, CommandsPlayer player, Object[] methodArgs) throws Throwable { @@ -219,10 +220,11 @@ public class CommandsManager { * @param methodArgs * @param level * @return + * @throws Throwable */ public boolean executeMethod(Method parent, String[] args, CommandsPlayer player, Object[] methodArgs, int level) - throws Throwable { + throws Throwable { String cmdName = args[level]; Map map = commands.get(parent); diff --git a/src/com/sk89q/util/StringUtil.java b/src/com/sk89q/util/StringUtil.java index 1ba76e79e..d76543e53 100644 --- a/src/com/sk89q/util/StringUtil.java +++ b/src/com/sk89q/util/StringUtil.java @@ -67,6 +67,7 @@ public class StringUtil { * @param str * @param delimiter * @param initialIndex + * @param quote * @return */ public static String joinQuotedString(String[] str, String delimiter, @@ -89,7 +90,6 @@ public class StringUtil { * * @param str * @param delimiter - * @param initialIndex * @return */ public static String joinString(String[] str, String delimiter) { diff --git a/src/com/sk89q/worldedit/BlockVector.java b/src/com/sk89q/worldedit/BlockVector.java index 5a0144870..a99969b24 100644 --- a/src/com/sk89q/worldedit/BlockVector.java +++ b/src/com/sk89q/worldedit/BlockVector.java @@ -36,8 +36,10 @@ public class BlockVector extends Vector { /** * Construct the Vector object. - * - * @param pt + * + * @param x + * @param y + * @param z */ public BlockVector(int x, int y, int z) { super(x, y, z); @@ -46,7 +48,10 @@ public class BlockVector extends Vector { /** * Construct the Vector object. * - * @param pt + * + * @param x + * @param y + * @param z */ public BlockVector(float x, float y, float z) { super(x, y, z); @@ -55,7 +60,10 @@ public class BlockVector extends Vector { /** * Construct the Vector object. * - * @param pt + * + * @param x + * @param y + * @param z */ public BlockVector(double x, double y, double z) { super(x, y, z); diff --git a/src/com/sk89q/worldedit/BlockVector2D.java b/src/com/sk89q/worldedit/BlockVector2D.java index c05071c8d..61a274dcb 100644 --- a/src/com/sk89q/worldedit/BlockVector2D.java +++ b/src/com/sk89q/worldedit/BlockVector2D.java @@ -37,7 +37,8 @@ public class BlockVector2D extends Vector2D { /** * Construct the Vector object. * - * @param pt + * @param x + * @param z */ public BlockVector2D(int x, int z) { super(x, z); @@ -46,7 +47,8 @@ public class BlockVector2D extends Vector2D { /** * Construct the Vector object. * - * @param pt + * @param x + * @param z */ public BlockVector2D(float x, float z) { super(x, z); @@ -55,7 +57,8 @@ public class BlockVector2D extends Vector2D { /** * Construct the Vector object. * - * @param pt + * @param x + * @param z */ public BlockVector2D(double x, double z) { super(x, z); diff --git a/src/com/sk89q/worldedit/BlockWorldVector.java b/src/com/sk89q/worldedit/BlockWorldVector.java index 805fdbce0..561a98028 100644 --- a/src/com/sk89q/worldedit/BlockWorldVector.java +++ b/src/com/sk89q/worldedit/BlockWorldVector.java @@ -36,6 +36,7 @@ public class BlockWorldVector extends WorldVector { /** * Construct the Vector object. + * @param world * * @param pt */ @@ -45,8 +46,11 @@ public class BlockWorldVector extends WorldVector { /** * Construct the Vector object. - * - * @param pt + * + * @param world + * @param x + * @param y + * @param z */ public BlockWorldVector(LocalWorld world, int x, int y, int z) { super(world, x, y, z); @@ -54,8 +58,11 @@ public class BlockWorldVector extends WorldVector { /** * Construct the Vector object. - * - * @param pt + * + * @param world + * @param x + * @param y + * @param z */ public BlockWorldVector(LocalWorld world, float x, float y, float z) { super(world, x, y, z); @@ -63,8 +70,11 @@ public class BlockWorldVector extends WorldVector { /** * Construct the Vector object. - * - * @param pt + * + * @param world + * @param x + * @param y + * @param z */ public BlockWorldVector(LocalWorld world, double x, double y, double z) { super(world, x, y, z); diff --git a/src/com/sk89q/worldedit/Countable.java b/src/com/sk89q/worldedit/Countable.java index 81082e214..b9d05194a 100644 --- a/src/com/sk89q/worldedit/Countable.java +++ b/src/com/sk89q/worldedit/Countable.java @@ -22,6 +22,7 @@ package com.sk89q.worldedit; /** * * @author sk89q + * @param */ public class Countable implements Comparable> { /** diff --git a/src/com/sk89q/worldedit/CuboidClipboard.java b/src/com/sk89q/worldedit/CuboidClipboard.java index 9ce37422f..28f2f4cca 100644 --- a/src/com/sk89q/worldedit/CuboidClipboard.java +++ b/src/com/sk89q/worldedit/CuboidClipboard.java @@ -78,6 +78,7 @@ public class CuboidClipboard { * * @param size * @param origin + * @param offset */ public CuboidClipboard(Vector size, Vector origin, Vector offset) { this.size = size; @@ -373,7 +374,6 @@ public class CuboidClipboard { * Load a .schematic file into a clipboard. * * @param path - * @param origin * @return clipboard * @throws DataException * @throws IOException @@ -556,7 +556,7 @@ public class CuboidClipboard { } /** - * @param origin the offset to set + * @param offset */ public void setOffset(Vector offset) { this.offset = offset; diff --git a/src/com/sk89q/worldedit/DoubleArrayList.java b/src/com/sk89q/worldedit/DoubleArrayList.java index 71d9d2765..3029b5b0a 100644 --- a/src/com/sk89q/worldedit/DoubleArrayList.java +++ b/src/com/sk89q/worldedit/DoubleArrayList.java @@ -30,6 +30,8 @@ import java.util.NoSuchElementException; * Double array lists to work like a Map, but not really. * * @author sk89q + * @param + * @param */ public class DoubleArrayList implements Iterable> { /** @@ -100,9 +102,8 @@ public class DoubleArrayList implements Iterable> { /** * Entry iterator. - * - * @param - * @param + * + * @param */ public class ForwardEntryIterator> implements Iterator> { @@ -131,8 +132,7 @@ public class DoubleArrayList implements Iterable> { /** * Entry iterator. * - * @param - * @param + * @param */ public class ReverseEntryIterator> implements Iterator> { @@ -161,8 +161,8 @@ public class DoubleArrayList implements Iterable> { /** * Class to masquerade as Map.Entry. * - * @param - * @param + * @param + * @param */ public class Entry implements Map.Entry { private A key; diff --git a/src/com/sk89q/worldedit/EditSession.java b/src/com/sk89q/worldedit/EditSession.java index be0954430..95a1bf4aa 100755 --- a/src/com/sk89q/worldedit/EditSession.java +++ b/src/com/sk89q/worldedit/EditSession.java @@ -393,6 +393,8 @@ public class EditSession { /** * Restores all blocks to their initial state. + * + * @param sess */ public void undo(EditSession sess) { for (Map.Entry entry : original) { @@ -404,6 +406,8 @@ public class EditSession { /** * Sets to new state. + * + * @param sess */ public void redo(EditSession sess) { for (Map.Entry entry : current) { @@ -416,6 +420,7 @@ public class EditSession { /** * Get the number of changed blocks. * + * @return */ public int size() { return original.size(); @@ -505,6 +510,7 @@ public class EditSession { * @param depth * @param recursive * @return number of blocks affected + * @throws MaxChangedBlocksException */ public int fillXZ(Vector origin, BaseBlock block, int radius, int depth, boolean recursive) throws MaxChangedBlocksException { @@ -609,6 +615,7 @@ public class EditSession { * @param depth * @param recursive * @return number of blocks affected + * @throws MaxChangedBlocksException */ public int fillXZ(Vector origin, Pattern pattern, int radius, int depth, boolean recursive) throws MaxChangedBlocksException { @@ -711,6 +718,7 @@ public class EditSession { * @param size * @param height * @return number of blocks affected + * @throws MaxChangedBlocksException */ public int removeAbove(Vector pos, int size, int height) throws MaxChangedBlocksException { @@ -745,6 +753,7 @@ public class EditSession { * @param size * @param height * @return number of blocks affected + * @throws MaxChangedBlocksException */ public int removeBelow(Vector pos, int size, int height) throws MaxChangedBlocksException { @@ -779,6 +788,7 @@ public class EditSession { * @param blockType * @param size * @return number of blocks affected + * @throws MaxChangedBlocksException */ public int removeNear(Vector pos, int blockType, int size) throws MaxChangedBlocksException { @@ -859,7 +869,7 @@ public class EditSession { * Sets all the blocks inside a region to a certain block type. * * @param region - * @param block + * @param pattern * @return number of blocks affected * @throws MaxChangedBlocksException */ @@ -905,9 +915,8 @@ public class EditSession { * Replaces all the blocks of a type inside a region to another block type. * * @param region - * @param fromBlockType - * -1 for non-air - * @param toBlockType + * @param fromBlockTypes -1 for non-air + * @param toBlock * @return number of blocks affected * @throws MaxChangedBlocksException */ @@ -963,8 +972,7 @@ public class EditSession { * Replaces all the blocks of a type inside a region to another block type. * * @param region - * @param fromBlockType - * -1 for non-air + * @param fromBlockTypes -1 for non-air * @param pattern * @return number of blocks affected * @throws MaxChangedBlocksException @@ -1395,6 +1403,8 @@ public class EditSession { * * @param pos * @param radius + * @param moving + * @param stationary * @return number of blocks affected * @throws MaxChangedBlocksException */ @@ -1826,9 +1836,9 @@ public class EditSession { * * @param pos * @param block - * @param c - * 0-1 chance + * @param c 0-1 chance * @return whether a block was changed + * @throws MaxChangedBlocksException */ public boolean setChanceBlockIfAir(Vector pos, BaseBlock block, double c) throws MaxChangedBlocksException { @@ -1917,6 +1927,7 @@ public class EditSession { * @param basePos * @param size * @return number of trees created + * @throws MaxChangedBlocksException */ public int makePumpkinPatches(Vector basePos, int size) throws MaxChangedBlocksException { @@ -1959,6 +1970,7 @@ public class EditSession { * @param density * @param treeGenerator * @return number of trees created + * @throws MaxChangedBlocksException */ public int makeForest(Vector basePos, int size, double density, TreeGenerator treeGenerator) throws MaxChangedBlocksException { diff --git a/src/com/sk89q/worldedit/LocalWorld.java b/src/com/sk89q/worldedit/LocalWorld.java index 1cb9b5e38..743dc95b7 100644 --- a/src/com/sk89q/worldedit/LocalWorld.java +++ b/src/com/sk89q/worldedit/LocalWorld.java @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . -*/ + */ package com.sk89q.worldedit; @@ -33,7 +33,7 @@ public abstract class LocalWorld { * Random generator. */ protected Random random = new Random(); - + /** * Set block type. * @@ -56,7 +56,6 @@ public abstract class LocalWorld { * * @param pt * @param data - * @return */ public abstract void setBlockData(Vector pt, int data); @@ -90,14 +89,17 @@ public abstract class LocalWorld { * Clear a chest's contents. * * @param pt + * @return */ public abstract boolean clearContainerBlockContents(Vector pt); /** * Generate a tree at a location. * + * @param editSession * @param pt * @return + * @throws MaxChangedBlocksException */ public abstract boolean generateTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException; @@ -105,8 +107,10 @@ public abstract class LocalWorld { /** * Generate a big tree at a location. * + * @param editSession * @param pt * @return + * @throws MaxChangedBlocksException */ public abstract boolean generateBigTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException; @@ -114,39 +118,44 @@ public abstract class LocalWorld { /** * Generate a birch tree at a location. * + * @param editSession * @param pt * @return + * @throws MaxChangedBlocksException */ public abstract boolean generateBirchTree(EditSession editSession, Vector pt) - throws MaxChangedBlocksException; + throws MaxChangedBlocksException; /** * Generate a redwood tree at a location. * + * @param editSession * @param pt * @return + * @throws MaxChangedBlocksException */ - public abstract boolean generateRedwoodTree(EditSession editSession, Vector pt) - throws MaxChangedBlocksException; + public abstract boolean generateRedwoodTree(EditSession editSession, + Vector pt) throws MaxChangedBlocksException; /** * Generate a tall redwood tree at a location. * + * @param editSession * @param pt * @return + * @throws MaxChangedBlocksException */ - public abstract boolean generateTallRedwoodTree(EditSession editSession, Vector pt) - throws MaxChangedBlocksException; + public abstract boolean generateTallRedwoodTree(EditSession editSession, + Vector pt) throws MaxChangedBlocksException; /** * Drop an item. - * + * * @param pt - * @param type - * @param count + * @param item * @param times */ - public void dropItem(Vector pt,BaseItemStack item, int times) { + public void dropItem(Vector pt, BaseItemStack item, int times) { for (int i = 0; i < times; i++) { dropItem(pt, item); } @@ -157,8 +166,6 @@ public abstract class LocalWorld { * * @param pt * @param item - * @param count - * @param times */ public abstract void dropItem(Vector pt, BaseItemStack item); @@ -169,56 +176,114 @@ public abstract class LocalWorld { */ public void simulateBlockMine(Vector pt) { int type = getBlockType(pt); - //setBlockType(pt, 0); + // setBlockType(pt, 0); - if (type == 1) { dropItem(pt, new BaseItemStack(4)); } // Stone - else if (type == 2) { dropItem(pt, new BaseItemStack(3)); } // Grass - else if (type == 7) { } // Bedrock - else if (type == 8) { } // Water - else if (type == 9) { } // Water - else if (type == 10) { } // Lava - else if (type == 11) { } // Lava + if (type == 1) { + dropItem(pt, new BaseItemStack(4)); + } // Stone + else if (type == 2) { + dropItem(pt, new BaseItemStack(3)); + } // Grass + else if (type == 7) { + } // Bedrock + else if (type == 8) { + } // Water + else if (type == 9) { + } // Water + else if (type == 10) { + } // Lava + else if (type == 11) { + } // Lava else if (type == 13) { // Gravel dropItem(pt, new BaseItemStack(type)); if (random.nextDouble() >= 0.9) { dropItem(pt, new BaseItemStack(318)); } - } - else if (type == 16) { dropItem(pt, new BaseItemStack(263)); } // Coal ore - else if (type == 17) { dropItem(pt, new BaseItemStack(17, 1, (short)getBlockData(pt))); } // Log + } else if (type == 16) { + dropItem(pt, new BaseItemStack(263)); + } // Coal ore + else if (type == 17) { + dropItem(pt, new BaseItemStack(17, 1, (short) getBlockData(pt))); + } // Log else if (type == 18) { // Leaves if (random.nextDouble() > 0.95) { dropItem(pt, new BaseItemStack(6)); } - } - else if (type == 20) { } // Glass - else if (type == 21) { dropItem(pt, new BaseItemStack(351, 1, (short)4), (random.nextInt(5)+4)); } - else if (type == 35) { dropItem(pt, new BaseItemStack(35, 1, (short)getBlockData(pt))); } // Cloth - else if (type == 43) { dropItem(pt, new BaseItemStack(44)); } // Double step - else if (type == 47) { } // Bookshelves - else if (type == 51) { } // Fire - else if (type == 52) { } // Mob spawner - else if (type == 53) { dropItem(pt, new BaseItemStack(5)); } // Wooden stairs - else if (type == 55) { dropItem(pt, new BaseItemStack(331)); } // Redstone wire - else if (type == 56) { dropItem(pt, new BaseItemStack(264)); } // Diamond ore - else if (type == 59) { dropItem(pt, new BaseItemStack(295)); } // Crops - else if (type == 60) { dropItem(pt, new BaseItemStack(3)); } // Soil - else if (type == 62) { dropItem(pt, new BaseItemStack(61)); } // Furnace - else if (type == 63) { dropItem(pt, new BaseItemStack(323)); } // Sign post - else if (type == 64) { dropItem(pt, new BaseItemStack(324)); } // Wood door - else if (type == 67) { dropItem(pt, new BaseItemStack(4)); } // Cobblestone stairs - else if (type == 68) { dropItem(pt, new BaseItemStack(323)); } // Wall sign - else if (type == 71) { dropItem(pt, new BaseItemStack(330)); } // Iron door - else if (type == 73) { dropItem(pt, new BaseItemStack(331), (random.nextInt(2)+4)); } // Redstone ore - else if (type == 74) { dropItem(pt, new BaseItemStack(331), (random.nextInt(2)+4)); } // Glowing redstone ore - else if (type == 75) { dropItem(pt, new BaseItemStack(76)); } // Redstone torch - else if (type == 78) { } // Snow - else if (type == 79) { } // Ice - else if (type == 82) { dropItem(pt, new BaseItemStack(337), 4); } // Clay - else if (type == 83) { dropItem(pt, new BaseItemStack(338)); } // Reed - else if (type == 89) { dropItem(pt, new BaseItemStack(348)); } // Lightstone - else if (type == 90) { } // Portal + } else if (type == 20) { + } // Glass + else if (type == 21) { + dropItem(pt, new BaseItemStack(351, 1, (short) 4), + (random.nextInt(5) + 4)); + } else if (type == 35) { + dropItem(pt, new BaseItemStack(35, 1, (short) getBlockData(pt))); + } // Cloth + else if (type == 43) { + dropItem(pt, new BaseItemStack(44)); + } // Double step + else if (type == 47) { + } // Bookshelves + else if (type == 51) { + } // Fire + else if (type == 52) { + } // Mob spawner + else if (type == 53) { + dropItem(pt, new BaseItemStack(5)); + } // Wooden stairs + else if (type == 55) { + dropItem(pt, new BaseItemStack(331)); + } // Redstone wire + else if (type == 56) { + dropItem(pt, new BaseItemStack(264)); + } // Diamond ore + else if (type == 59) { + dropItem(pt, new BaseItemStack(295)); + } // Crops + else if (type == 60) { + dropItem(pt, new BaseItemStack(3)); + } // Soil + else if (type == 62) { + dropItem(pt, new BaseItemStack(61)); + } // Furnace + else if (type == 63) { + dropItem(pt, new BaseItemStack(323)); + } // Sign post + else if (type == 64) { + dropItem(pt, new BaseItemStack(324)); + } // Wood door + else if (type == 67) { + dropItem(pt, new BaseItemStack(4)); + } // Cobblestone stairs + else if (type == 68) { + dropItem(pt, new BaseItemStack(323)); + } // Wall sign + else if (type == 71) { + dropItem(pt, new BaseItemStack(330)); + } // Iron door + else if (type == 73) { + dropItem(pt, new BaseItemStack(331), (random.nextInt(2) + 4)); + } // Redstone ore + else if (type == 74) { + dropItem(pt, new BaseItemStack(331), (random.nextInt(2) + 4)); + } // Glowing redstone ore + else if (type == 75) { + dropItem(pt, new BaseItemStack(76)); + } // Redstone torch + else if (type == 78) { + } // Snow + else if (type == 79) { + } // Ice + else if (type == 82) { + dropItem(pt, new BaseItemStack(337), 4); + } // Clay + else if (type == 83) { + dropItem(pt, new BaseItemStack(338)); + } // Reed + else if (type == 89) { + dropItem(pt, new BaseItemStack(348)); + } // Lightstone + else if (type == 90) { + } // Portal else if (type != 0) { dropItem(pt, new BaseItemStack(type)); } @@ -232,18 +297,21 @@ public abstract class LocalWorld { * @return */ public abstract int killMobs(Vector origin, int radius); - + /** * Compare if the other world is equal. * * @param other * @return */ + @Override public abstract boolean equals(Object other); + /** * Hash code. * * @return */ + @Override public abstract int hashCode(); } diff --git a/src/com/sk89q/worldedit/LogFormat.java b/src/com/sk89q/worldedit/LogFormat.java index bb295e6c7..633a35491 100644 --- a/src/com/sk89q/worldedit/LogFormat.java +++ b/src/com/sk89q/worldedit/LogFormat.java @@ -31,6 +31,7 @@ import java.io.StringWriter; * @author sk89q */ public class LogFormat extends Formatter { + @Override public String format(LogRecord record) { StringBuilder text = new StringBuilder(); Level level = record.getLevel(); diff --git a/src/com/sk89q/worldedit/Vector.java b/src/com/sk89q/worldedit/Vector.java index ab8bdee5e..351001b50 100644 --- a/src/com/sk89q/worldedit/Vector.java +++ b/src/com/sk89q/worldedit/Vector.java @@ -437,7 +437,6 @@ public class Vector { /** * Get the length of the vector. * - * @param pt * @return distance */ public double length() { @@ -473,7 +472,6 @@ public class Vector { /** * Get the normalized vector. * - * @param pt * @return vector */ public Vector normalize() { @@ -520,12 +518,11 @@ public class Vector { /** * 2D transformation. * - * @param vec * @param angle in degrees * @param aboutX - * @param aboutY + * @param aboutZ * @param translateX - * @param translateY + * @param translateZ * @return */ public Vector transform2D(double angle, @@ -557,9 +554,6 @@ public class Vector { /** * Get a block point from a point. * - * @param x - * @param y - * @param z * @return point */ public BlockVector toBlockPoint() { diff --git a/src/com/sk89q/worldedit/Vector2D.java b/src/com/sk89q/worldedit/Vector2D.java index 14ad7c5b1..15893488f 100644 --- a/src/com/sk89q/worldedit/Vector2D.java +++ b/src/com/sk89q/worldedit/Vector2D.java @@ -21,7 +21,7 @@ package com.sk89q.worldedit; /** * - * @author Albert + * @author sk89q */ public class Vector2D { protected final double x, z; @@ -52,7 +52,6 @@ public class Vector2D { * Construct the Vector2D object. * * @param x - * @param y * @param z */ public Vector2D(float x, float z) { diff --git a/src/com/sk89q/worldedit/WorldVector.java b/src/com/sk89q/worldedit/WorldVector.java index 63130441a..97101f980 100644 --- a/src/com/sk89q/worldedit/WorldVector.java +++ b/src/com/sk89q/worldedit/WorldVector.java @@ -33,6 +33,7 @@ public class WorldVector extends Vector { /** * Construct the Vector object. * + * @param world * @param x * @param y * @param z @@ -45,6 +46,7 @@ public class WorldVector extends Vector { /** * Construct the Vector object. * + * @param world * @param x * @param y * @param z @@ -57,6 +59,7 @@ public class WorldVector extends Vector { /** * Construct the Vector object. * + * @param world * @param x * @param y * @param z @@ -69,6 +72,7 @@ public class WorldVector extends Vector { /** * Construct the Vector object. * + * @param world * @param pt */ public WorldVector(LocalWorld world, Vector pt) { @@ -78,6 +82,8 @@ public class WorldVector extends Vector { /** * Construct the Vector object. + * + * @param world */ public WorldVector(LocalWorld world) { super(); @@ -96,6 +102,7 @@ public class WorldVector extends Vector { /** * Get a block point from a point. * + * @param world * @param x * @param y * @param z diff --git a/src/com/sk89q/worldedit/bags/BlockBag.java b/src/com/sk89q/worldedit/bags/BlockBag.java index 90bf92257..69c460047 100644 --- a/src/com/sk89q/worldedit/bags/BlockBag.java +++ b/src/com/sk89q/worldedit/bags/BlockBag.java @@ -105,6 +105,7 @@ public abstract class BlockBag { * Get a block. * * @param id + * @throws BlockBagException */ public abstract void fetchBlock(int id) throws BlockBagException; @@ -112,6 +113,7 @@ public abstract class BlockBag { * Store a block. * * @param id + * @throws BlockBagException */ public abstract void storeBlock(int id) throws BlockBagException; @@ -140,14 +142,12 @@ public abstract class BlockBag { * Adds a position to be used a source. * * @param pos - * @return */ public abstract void addSourcePosition(Vector pos); /** * Adds a position to be used a source. * * @param pos - * @return */ public abstract void addSingleSourcePosition(Vector pos); } diff --git a/src/com/sk89q/worldedit/blocks/BaseBlock.java b/src/com/sk89q/worldedit/blocks/BaseBlock.java index f614828af..33120bd4a 100644 --- a/src/com/sk89q/worldedit/blocks/BaseBlock.java +++ b/src/com/sk89q/worldedit/blocks/BaseBlock.java @@ -49,6 +49,7 @@ public class BaseBlock { * Construct the block with its type and data. * * @param type + * @param data */ public BaseBlock(int type, int data) { this.type = (short)type; diff --git a/src/com/sk89q/worldedit/blocks/BaseItem.java b/src/com/sk89q/worldedit/blocks/BaseItem.java index 9767f95a6..3e668a077 100644 --- a/src/com/sk89q/worldedit/blocks/BaseItem.java +++ b/src/com/sk89q/worldedit/blocks/BaseItem.java @@ -48,6 +48,7 @@ public class BaseItem { * Construct the object. * * @param id + * @param damage */ public BaseItem(int id, short damage) { this.id = id; diff --git a/src/com/sk89q/worldedit/blocks/BaseItemStack.java b/src/com/sk89q/worldedit/blocks/BaseItemStack.java index e9f047bf1..2215bee9d 100644 --- a/src/com/sk89q/worldedit/blocks/BaseItemStack.java +++ b/src/com/sk89q/worldedit/blocks/BaseItemStack.java @@ -43,6 +43,7 @@ public class BaseItemStack extends BaseItem { * Construct the object. * * @param id + * @param amount */ public BaseItemStack(int id, int amount) { super(id); @@ -53,6 +54,8 @@ public class BaseItemStack extends BaseItem { * Construct the object. * * @param id + * @param amount + * @param damage */ public BaseItemStack(int id, int amount, short damage) { super(id, damage); diff --git a/src/com/sk89q/worldedit/blocks/BlockType.java b/src/com/sk89q/worldedit/blocks/BlockType.java index 4e716300d..34b50968c 100644 --- a/src/com/sk89q/worldedit/blocks/BlockType.java +++ b/src/com/sk89q/worldedit/blocks/BlockType.java @@ -284,7 +284,6 @@ public enum BlockType { /** * Checks to see whether a block should be placed last. * - * @param id * @return */ public boolean shouldPlaceLast() { diff --git a/src/com/sk89q/worldedit/blocks/ChestBlock.java b/src/com/sk89q/worldedit/blocks/ChestBlock.java index f77a2c665..678bc618d 100644 --- a/src/com/sk89q/worldedit/blocks/ChestBlock.java +++ b/src/com/sk89q/worldedit/blocks/ChestBlock.java @@ -77,8 +77,6 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock, ContainerB /** * Set the list of items. - * - * @return */ public void setItems(BaseItemStack[] items) { this.items = items; diff --git a/src/com/sk89q/worldedit/blocks/ContainerBlock.java b/src/com/sk89q/worldedit/blocks/ContainerBlock.java index 186f5b515..3780ce4ce 100644 --- a/src/com/sk89q/worldedit/blocks/ContainerBlock.java +++ b/src/com/sk89q/worldedit/blocks/ContainerBlock.java @@ -34,8 +34,8 @@ public interface ContainerBlock { /** * Set the list of items. - * - * @return + * + * @param items */ public void setItems(BaseItemStack[] items); } diff --git a/src/com/sk89q/worldedit/blocks/DispenserBlock.java b/src/com/sk89q/worldedit/blocks/DispenserBlock.java index f495983dc..f887c1edc 100644 --- a/src/com/sk89q/worldedit/blocks/DispenserBlock.java +++ b/src/com/sk89q/worldedit/blocks/DispenserBlock.java @@ -77,8 +77,6 @@ public class DispenserBlock extends BaseBlock implements TileEntityBlock, Contai /** * Set the list of items. - * - * @return */ public void setItems(BaseItemStack[] items) { this.items = items; diff --git a/src/com/sk89q/worldedit/blocks/FurnaceBlock.java b/src/com/sk89q/worldedit/blocks/FurnaceBlock.java index 6b132a9d9..d72066407 100644 --- a/src/com/sk89q/worldedit/blocks/FurnaceBlock.java +++ b/src/com/sk89q/worldedit/blocks/FurnaceBlock.java @@ -49,6 +49,8 @@ public class FurnaceBlock extends BaseBlock implements TileEntityBlock, Containe /** * Construct the chest block. + * + * @param type */ public FurnaceBlock(int type) { super(type); @@ -58,6 +60,7 @@ public class FurnaceBlock extends BaseBlock implements TileEntityBlock, Containe /** * Construct the chest block. * + * @param type * @param data */ public FurnaceBlock(int type, int data) { @@ -68,6 +71,7 @@ public class FurnaceBlock extends BaseBlock implements TileEntityBlock, Containe /** * Construct the chest block. * + * @param type * @param data * @param items */ @@ -87,8 +91,6 @@ public class FurnaceBlock extends BaseBlock implements TileEntityBlock, Containe /** * Set the list of items. - * - * @return */ public void setItems(BaseItemStack[] items) { this.items = items; diff --git a/src/com/sk89q/worldedit/blocks/MobSpawnerBlock.java b/src/com/sk89q/worldedit/blocks/MobSpawnerBlock.java index 45b8c5d82..64d2e673f 100644 --- a/src/com/sk89q/worldedit/blocks/MobSpawnerBlock.java +++ b/src/com/sk89q/worldedit/blocks/MobSpawnerBlock.java @@ -89,8 +89,8 @@ public class MobSpawnerBlock extends BaseBlock implements TileEntityBlock { /** * Set the mob type. - * - * @return + * + * @param mobType */ public void setMobType(String mobType) { this.mobType = mobType; diff --git a/src/com/sk89q/worldedit/blocks/NoteBlock.java b/src/com/sk89q/worldedit/blocks/NoteBlock.java index 48cf7a101..5a186127f 100644 --- a/src/com/sk89q/worldedit/blocks/NoteBlock.java +++ b/src/com/sk89q/worldedit/blocks/NoteBlock.java @@ -36,8 +36,6 @@ public class NoteBlock extends BaseBlock implements TileEntityBlock { /** * Construct the note block. - * - * @param data */ public NoteBlock() { super(25); @@ -57,6 +55,7 @@ public class NoteBlock extends BaseBlock implements TileEntityBlock { /** * Construct the note block. * + * @param data * @param note */ public NoteBlock(int data, byte note) { diff --git a/src/com/sk89q/worldedit/blocks/SignBlock.java b/src/com/sk89q/worldedit/blocks/SignBlock.java index 18a39a3f1..d36146a13 100644 --- a/src/com/sk89q/worldedit/blocks/SignBlock.java +++ b/src/com/sk89q/worldedit/blocks/SignBlock.java @@ -36,8 +36,9 @@ public class SignBlock extends BaseBlock implements TileEntityBlock { /** * Construct the sign without text. - * - * @param text + * + * @param type + * @param data */ public SignBlock(int type, int data) { super(type, data); @@ -46,8 +47,10 @@ public class SignBlock extends BaseBlock implements TileEntityBlock { /** * Construct the sign with text. - * - * @param text + * + * @param type + * @param data + * @param text */ public SignBlock(int type, int data, String[] text) { super(type, data); diff --git a/src/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java b/src/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java index 35d1b914e..b3749dcf9 100644 --- a/src/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java +++ b/src/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java @@ -66,6 +66,7 @@ public class BukkitPlayerBlockBag extends BlockBag { * * @param id */ + @Override public void fetchBlock(int id) throws BlockBagException { if (id == 0) { throw new IllegalArgumentException("Can't fetch air block"); @@ -111,6 +112,7 @@ public class BukkitPlayerBlockBag extends BlockBag { * * @param id */ + @Override public void storeBlock(int id) throws BlockBagException { if (id == 0) { throw new IllegalArgumentException("Can't store air block"); @@ -163,6 +165,7 @@ public class BukkitPlayerBlockBag extends BlockBag { /** * Flush any changes. This is called at the end. */ + @Override public void flushChanges() { if (items != null) { player.getInventory().setContents(items); @@ -174,16 +177,17 @@ public class BukkitPlayerBlockBag extends BlockBag { * Adds a position to be used a source. * * @param pos - * @return */ + @Override public void addSourcePosition(Vector pos) { } + /** * Adds a position to be used a source. * * @param pos - * @return */ + @Override public void addSingleSourcePosition(Vector pos) { } } diff --git a/src/com/sk89q/worldedit/bukkit/WorldEditBlockListener.java b/src/com/sk89q/worldedit/bukkit/WorldEditBlockListener.java index 9aa947321..53d058c4e 100644 --- a/src/com/sk89q/worldedit/bukkit/WorldEditBlockListener.java +++ b/src/com/sk89q/worldedit/bukkit/WorldEditBlockListener.java @@ -46,6 +46,7 @@ public class WorldEditBlockListener extends BlockListener { * * @param event Relevant event details */ + @Override public void onBlockDamage(BlockDamageEvent event) { LocalWorld world = new BukkitWorld(event.getBlock().getWorld()); WorldVector pos = new WorldVector(world, event.getBlock().getX(), @@ -62,6 +63,7 @@ public class WorldEditBlockListener extends BlockListener { * * @param event Relevant event details */ + @Override public void onBlockRightClick(BlockRightClickEvent event) { LocalWorld world = new BukkitWorld(event.getBlock().getWorld()); WorldVector pos = new WorldVector(world, event.getBlock().getX(), diff --git a/src/com/sk89q/worldedit/data/AlphaChunkStore.java b/src/com/sk89q/worldedit/data/AlphaChunkStore.java index 21a7bb1ad..38da78f99 100644 --- a/src/com/sk89q/worldedit/data/AlphaChunkStore.java +++ b/src/com/sk89q/worldedit/data/AlphaChunkStore.java @@ -52,6 +52,7 @@ public class AlphaChunkStore extends NestedFileChunkStore { * @throws DataException * @throws IOException */ + @Override protected InputStream getInputStream(String f1, String f2, String name) throws DataException, IOException { String file = f1 + File.separator + f2 + File.separator + name; diff --git a/src/com/sk89q/worldedit/data/Chunk.java b/src/com/sk89q/worldedit/data/Chunk.java index eb477305b..ae05e4f92 100644 --- a/src/com/sk89q/worldedit/data/Chunk.java +++ b/src/com/sk89q/worldedit/data/Chunk.java @@ -38,12 +38,13 @@ public class Chunk { private byte[] data; private int rootX; private int rootZ; - Map> tileEntities; + private Map> tileEntities; /** * Construct the chunk with a compound tag. * - * @param rootTag + * @param tag + * @throws DataException */ public Chunk(CompoundTag tag) throws DataException { rootTag = tag; diff --git a/src/com/sk89q/worldedit/data/ChunkStore.java b/src/com/sk89q/worldedit/data/ChunkStore.java index b4f13a398..99cca9949 100644 --- a/src/com/sk89q/worldedit/data/ChunkStore.java +++ b/src/com/sk89q/worldedit/data/ChunkStore.java @@ -34,8 +34,6 @@ public abstract class ChunkStore { * * @param pos * @return - * @throws ChunkStoreException - * @throws IOException */ public static BlockVector2D toChunk(Vector pos) { int chunkX = (int)Math.floor(pos.getBlockX() / 16.0); @@ -58,8 +56,7 @@ public abstract class ChunkStore { /** * Get a chunk at a location. * - * @param x - * @param z + * @param pos * @return * @throws ChunkStoreException * @throws IOException diff --git a/src/com/sk89q/worldedit/data/NestedFileChunkStore.java b/src/com/sk89q/worldedit/data/NestedFileChunkStore.java index 7570a1dd3..9cd08fde2 100644 --- a/src/com/sk89q/worldedit/data/NestedFileChunkStore.java +++ b/src/com/sk89q/worldedit/data/NestedFileChunkStore.java @@ -56,7 +56,6 @@ public abstract class NestedFileChunkStore extends ChunkStore { * separator. * * @param pos - * @param separator * @return */ public static String getFilename(Vector2D pos) { @@ -71,6 +70,7 @@ public abstract class NestedFileChunkStore extends ChunkStore { * @throws DataException * @throws IOException */ + @Override public CompoundTag getChunkTag(Vector2D pos) throws DataException, IOException { int x = pos.getBlockX(); diff --git a/src/com/sk89q/worldedit/data/TrueZipAlphaChunkStore.java b/src/com/sk89q/worldedit/data/TrueZipAlphaChunkStore.java index 326cb3a8d..de521698b 100644 --- a/src/com/sk89q/worldedit/data/TrueZipAlphaChunkStore.java +++ b/src/com/sk89q/worldedit/data/TrueZipAlphaChunkStore.java @@ -89,6 +89,7 @@ public class TrueZipAlphaChunkStore extends NestedFileChunkStore { * @throws DataException * @throws IOException */ + @Override protected InputStream getInputStream(String f1, String f2, String name) throws DataException, IOException { String file = f1 + File.separator + f2 + File.separator + name; diff --git a/src/com/sk89q/worldedit/data/TrueZipLegacyAlphaChunkStore.java b/src/com/sk89q/worldedit/data/TrueZipLegacyAlphaChunkStore.java index cc8b28459..e5372f147 100644 --- a/src/com/sk89q/worldedit/data/TrueZipLegacyAlphaChunkStore.java +++ b/src/com/sk89q/worldedit/data/TrueZipLegacyAlphaChunkStore.java @@ -54,7 +54,7 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore { * @param zipFile * @param folder * @throws IOException - * @throws ZIPException + * @throws ZipException */ public TrueZipLegacyAlphaChunkStore(File zipFile, String folder) throws IOException, ZipException { @@ -69,9 +69,8 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore { * be detected. * * @param zipFile - * @param folder * @throws IOException - * @throws ZIPException + * @throws ZipException */ public TrueZipLegacyAlphaChunkStore(File zipFile) throws IOException, ZipException { @@ -90,6 +89,7 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore { * @throws IOException * @throws DataException */ + @Override @SuppressWarnings("unchecked") protected InputStream getInputStream(String f1, String f2, String name) throws IOException, DataException { @@ -160,6 +160,7 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore { * * @throws IOException */ + @Override public void close() throws IOException { zip.close(); } diff --git a/src/com/sk89q/worldedit/data/ZippedAlphaChunkStore.java b/src/com/sk89q/worldedit/data/ZippedAlphaChunkStore.java index d8c0b7024..65b783cfc 100644 --- a/src/com/sk89q/worldedit/data/ZippedAlphaChunkStore.java +++ b/src/com/sk89q/worldedit/data/ZippedAlphaChunkStore.java @@ -52,7 +52,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore { * @param zipFile * @param folder * @throws IOException - * @throws ZIPException + * @throws ZipException */ public ZippedAlphaChunkStore(File zipFile, String folder) throws IOException, ZipException { @@ -67,9 +67,8 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore { * be detected. * * @param zipFile - * @param folder * @throws IOException - * @throws ZIPException + * @throws ZipException */ public ZippedAlphaChunkStore(File zipFile) throws IOException, ZipException { @@ -88,6 +87,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore { * @throws IOException * @throws DataException */ + @Override protected InputStream getInputStream(String f1, String f2, String name) throws IOException, DataException { String file = f1 + "/" + f2 + "/" + name; @@ -157,6 +157,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore { * * @throws IOException */ + @Override public void close() throws IOException { zip.close(); } diff --git a/src/com/sk89q/worldedit/masks/Mask.java b/src/com/sk89q/worldedit/masks/Mask.java index 3384cdb75..e13effcc8 100644 --- a/src/com/sk89q/worldedit/masks/Mask.java +++ b/src/com/sk89q/worldedit/masks/Mask.java @@ -35,6 +35,7 @@ public interface Mask { * as getting a BaseBlock has unneeded overhead in most block querying * situations (enumerating a chest's contents is a waste, for example). * + * @param editSession * @param pos * @return */ diff --git a/src/com/sk89q/worldedit/patterns/ClipboardPattern.java b/src/com/sk89q/worldedit/patterns/ClipboardPattern.java index 8ec181c39..23227cd9b 100644 --- a/src/com/sk89q/worldedit/patterns/ClipboardPattern.java +++ b/src/com/sk89q/worldedit/patterns/ClipboardPattern.java @@ -40,7 +40,7 @@ public class ClipboardPattern implements Pattern { /** * Construct the object. * - * @param blockType + * @param clipboard */ public ClipboardPattern(CuboidClipboard clipboard) { this.clipboard = clipboard; diff --git a/src/com/sk89q/worldedit/patterns/RandomFillPattern.java b/src/com/sk89q/worldedit/patterns/RandomFillPattern.java index 765134e79..5d767ab33 100644 --- a/src/com/sk89q/worldedit/patterns/RandomFillPattern.java +++ b/src/com/sk89q/worldedit/patterns/RandomFillPattern.java @@ -43,7 +43,7 @@ public class RandomFillPattern implements Pattern { /** * Construct the object. * - * @param blockType + * @param blocks */ public RandomFillPattern(List blocks) { double max = 0; diff --git a/src/com/sk89q/worldedit/patterns/SingleBlockPattern.java b/src/com/sk89q/worldedit/patterns/SingleBlockPattern.java index 8bc996574..c0318a799 100644 --- a/src/com/sk89q/worldedit/patterns/SingleBlockPattern.java +++ b/src/com/sk89q/worldedit/patterns/SingleBlockPattern.java @@ -36,7 +36,7 @@ public class SingleBlockPattern implements Pattern { /** * Construct the object. * - * @param blockType + * @param block */ public SingleBlockPattern(BaseBlock block) { this.block = block; diff --git a/src/com/sk89q/worldedit/scripting/CraftScriptContext.java b/src/com/sk89q/worldedit/scripting/CraftScriptContext.java index 25463883e..ab6df36e1 100644 --- a/src/com/sk89q/worldedit/scripting/CraftScriptContext.java +++ b/src/com/sk89q/worldedit/scripting/CraftScriptContext.java @@ -134,7 +134,6 @@ public class CraftScriptContext extends CraftScriptEnvironment { /** * Checks to make sure that there are enough but not too many arguments. * - * @param args * @param min * @param max -1 for no maximum * @param usage usage string @@ -179,6 +178,8 @@ public class CraftScriptContext extends CraftScriptEnvironment { * * @param list * @return pattern + * @throws UnknownItemException + * @throws DisallowedItemException */ public Pattern getBlockPattern(String list) throws UnknownItemException, DisallowedItemException { @@ -191,6 +192,8 @@ public class CraftScriptContext extends CraftScriptEnvironment { * @param list * @param allBlocksAllowed * @return set + * @throws UnknownItemException + * @throws DisallowedItemException */ public Set getBlockIDs(String list, boolean allBlocksAllowed) throws UnknownItemException, DisallowedItemException { diff --git a/src/com/sk89q/worldedit/scripting/RhinoContextFactory.java b/src/com/sk89q/worldedit/scripting/RhinoContextFactory.java index 381b6c5f8..bbbeb36af 100644 --- a/src/com/sk89q/worldedit/scripting/RhinoContextFactory.java +++ b/src/com/sk89q/worldedit/scripting/RhinoContextFactory.java @@ -28,12 +28,14 @@ public class RhinoContextFactory extends ContextFactory { this.timeLimit = timeLimit; } + @Override protected Context makeContext() { RhinoContext cx = new RhinoContext(this); cx.setInstructionObserverThreshold(10000); return cx; } + @Override protected void observeInstructionCount(Context cx, int instructionCount) { RhinoContext mcx = (RhinoContext)cx; long currentTime = System.currentTimeMillis(); @@ -43,6 +45,7 @@ public class RhinoContextFactory extends ContextFactory { } } + @Override protected Object doTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { RhinoContext mcx = (RhinoContext)cx; diff --git a/src/com/sk89q/worldedit/snapshots/Snapshot.java b/src/com/sk89q/worldedit/snapshots/Snapshot.java index 976b7048a..f653ea890 100644 --- a/src/com/sk89q/worldedit/snapshots/Snapshot.java +++ b/src/com/sk89q/worldedit/snapshots/Snapshot.java @@ -39,8 +39,7 @@ public class Snapshot { /** * Construct a snapshot restoration operation. * - * @param editSession - * @param dir + * @param repo * @param snapshot */ public Snapshot(SnapshotRepository repo, String snapshot) { @@ -53,6 +52,7 @@ public class Snapshot { * * @return * @throws IOException + * @throws DataException */ public ChunkStore getChunkStore() throws IOException, DataException { if (file.getName().toLowerCase().endsWith(".zip")) { diff --git a/src/com/sk89q/worldedit/snapshots/SnapshotRepository.java b/src/com/sk89q/worldedit/snapshots/SnapshotRepository.java index 78c83e5a9..ea284d04b 100644 --- a/src/com/sk89q/worldedit/snapshots/SnapshotRepository.java +++ b/src/com/sk89q/worldedit/snapshots/SnapshotRepository.java @@ -102,7 +102,7 @@ public class SnapshotRepository { /** * Check to see if a snapshot is valid. * - * @param dir + * @param snapshot * @return whether it is a valid snapshot */ public boolean isValidSnapshotName(String snapshot) { diff --git a/src/com/sk89q/worldedit/snapshots/SnapshotRestore.java b/src/com/sk89q/worldedit/snapshots/SnapshotRestore.java index 820a19bf3..d1800946a 100644 --- a/src/com/sk89q/worldedit/snapshots/SnapshotRestore.java +++ b/src/com/sk89q/worldedit/snapshots/SnapshotRestore.java @@ -58,6 +58,7 @@ public class SnapshotRestore { /** * Construct the snapshot restore operation. * + * @param chunkStore * @param region */ public SnapshotRestore(ChunkStore chunkStore, Region region) { @@ -131,7 +132,7 @@ public class SnapshotRestore { * Restores to world. * * @param editSession - * @param region + * @throws MaxChangedBlocksException */ public void restore(EditSession editSession) throws MaxChangedBlocksException { diff --git a/src/com/sk89q/worldedit/tools/brushes/BrushShape.java b/src/com/sk89q/worldedit/tools/brushes/BrushShape.java index eeee909c6..1f474cea2 100644 --- a/src/com/sk89q/worldedit/tools/brushes/BrushShape.java +++ b/src/com/sk89q/worldedit/tools/brushes/BrushShape.java @@ -33,7 +33,7 @@ public interface BrushShape { /** * Build the object. * - * @param build + * @param editSession * @param pos * @param mat * @param size diff --git a/src/com/sk89q/worldedit/util/FileDialogUtil.java b/src/com/sk89q/worldedit/util/FileDialogUtil.java index c91e9242b..5fa9569c5 100644 --- a/src/com/sk89q/worldedit/util/FileDialogUtil.java +++ b/src/com/sk89q/worldedit/util/FileDialogUtil.java @@ -70,6 +70,7 @@ public class FileDialogUtil { desc = StringUtil.joinString(exts, ","); } + @Override public boolean accept(File f) { if (f.isDirectory()) { return true; @@ -83,6 +84,7 @@ public class FileDialogUtil { } } + @Override public String getDescription() { return desc; } diff --git a/src/com/sk89q/worldedit/util/PropertiesConfiguration.java b/src/com/sk89q/worldedit/util/PropertiesConfiguration.java index e984ed263..17c73e311 100644 --- a/src/com/sk89q/worldedit/util/PropertiesConfiguration.java +++ b/src/com/sk89q/worldedit/util/PropertiesConfiguration.java @@ -51,6 +51,7 @@ public class PropertiesConfiguration extends LocalConfiguration { /** * Load the configuration file. */ + @Override public void load() { InputStream stream = null; try { diff --git a/src/com/sk89q/worldedit/util/TreeGenerator.java b/src/com/sk89q/worldedit/util/TreeGenerator.java index 7bc2262cb..50551a5cc 100644 --- a/src/com/sk89q/worldedit/util/TreeGenerator.java +++ b/src/com/sk89q/worldedit/util/TreeGenerator.java @@ -107,7 +107,6 @@ public class TreeGenerator { /** * Generate a tree. * - * @param world * @param editSession * @param pos * @return