From 324a041e3853182d54fa5de4fb4d9652420f7d48 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Mon, 26 Dec 2011 00:36:23 +0100 Subject: [PATCH] Split up some external .* imports. --- .../bukkit/util/CommandRegistration.java | 8 ++++++-- .../util/commands/CommandsManager.java | 7 ++++++- .../com/sk89q/util/yaml/YAMLProcessor.java | 6 +++++- .../ConfigurationPermissionsResolver.java | 6 +++++- .../com/sk89q/worldedit/CuboidClipboard.java | 5 ++++- .../java/com/sk89q/worldedit/WorldEdit.java | 15 +++++++++++--- .../sk89q/worldedit/bukkit/BukkitPlayer.java | 2 +- .../bukkit/BukkitServerInterface.java | 6 +++++- .../sk89q/worldedit/bukkit/BukkitUtil.java | 8 +++++--- .../worldedit/commands/ChunkCommands.java | 4 +++- .../com/sk89q/worldedit/data/ChunkStore.java | 2 +- .../worldedit/data/FileLegacyChunkStore.java | 6 +++++- .../worldedit/data/LegacyChunkStore.java | 4 +++- .../sk89q/worldedit/data/McRegionReader.java | 9 +++++++-- .../data/TrueZipLegacyChunkStore.java | 7 +++++-- .../data/TrueZipMcRegionChunkStore.java | 7 +++++-- .../data/ZippedLegacyChunkStore.java | 8 ++++++-- .../data/ZippedMcRegionChunkStore.java | 8 ++++++-- .../worldedit/dev/DocumentationPrinter.java | 5 ++++- .../scripting/RhinoContextFactory.java | 5 ++++- .../scripting/RhinoCraftScriptEngine.java | 9 ++++++++- .../scripting/java/RhinoScriptEngine.java | 20 ++++++++++++++++--- .../sk89q/worldedit/snapshots/Snapshot.java | 3 ++- .../snapshots/SnapshotRepository.java | 3 ++- .../sk89q/worldedit/util/FileDialogUtil.java | 2 +- .../util/PropertiesConfiguration.java | 8 +++++++- .../sk89q/wepif/TestOfflinePermissible.java | 5 ++++- 27 files changed, 139 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java b/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java index 560715ff3..f0f304735 100644 --- a/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java +++ b/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java @@ -18,6 +18,12 @@ package com.sk89q.bukkit.util; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + import com.sk89q.minecraft.util.commands.Command; import com.sk89q.util.ReflectionUtil; import org.bukkit.Bukkit; @@ -26,8 +32,6 @@ import org.bukkit.command.SimpleCommandMap; import org.bukkit.event.Event; import org.bukkit.plugin.Plugin; -import java.util.*; - /** * @author zml2008 */ diff --git a/src/main/java/com/sk89q/minecraft/util/commands/CommandsManager.java b/src/main/java/com/sk89q/minecraft/util/commands/CommandsManager.java index b3124777d..31e2b16a1 100644 --- a/src/main/java/com/sk89q/minecraft/util/commands/CommandsManager.java +++ b/src/main/java/com/sk89q/minecraft/util/commands/CommandsManager.java @@ -22,7 +22,12 @@ package com.sk89q.minecraft.util.commands; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java b/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java index ac02685bc..e513d25d7 100644 --- a/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java +++ b/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java @@ -25,7 +25,11 @@ import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.reader.UnicodeReader; import org.yaml.snakeyaml.representer.Representer; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java b/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java index e5a8dbeea..931000916 100644 --- a/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java +++ b/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java @@ -19,7 +19,11 @@ package com.sk89q.wepif; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import com.sk89q.util.yaml.YAMLNode; import com.sk89q.util.yaml.YAMLProcessor; diff --git a/src/main/java/com/sk89q/worldedit/CuboidClipboard.java b/src/main/java/com/sk89q/worldedit/CuboidClipboard.java index fbb91e947..d5450cf9c 100644 --- a/src/main/java/com/sk89q/worldedit/CuboidClipboard.java +++ b/src/main/java/com/sk89q/worldedit/CuboidClipboard.java @@ -22,7 +22,10 @@ package com.sk89q.worldedit; import com.sk89q.jnbt.*; import com.sk89q.worldedit.blocks.*; import com.sk89q.worldedit.data.*; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; import java.util.Map; import java.util.HashMap; import java.util.ArrayList; diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index 696e875ed..ef3ff1bb9 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -19,16 +19,25 @@ package com.sk89q.worldedit; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.logging.Logger; import java.util.regex.Matcher; -import java.io.*; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; import java.lang.reflect.Method; import javax.script.ScriptException; import com.sk89q.minecraft.util.commands.*; -import com.sk89q.minecraft.util.commands.Console; import com.sk89q.util.StringUtil; import com.sk89q.worldedit.CuboidClipboard.FlipDirection; diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java index 71a613546..0d519f881 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java @@ -19,7 +19,7 @@ package com.sk89q.worldedit.bukkit; -import org.bukkit.*; +import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import com.sk89q.util.StringUtil; diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java index 32cb29c71..6cfcdc7cf 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java @@ -24,7 +24,11 @@ import java.util.List; import com.sk89q.bukkit.util.CommandRegistration; import com.sk89q.minecraft.util.commands.Command; -import org.bukkit.*; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.Server; +import org.bukkit.World; import org.bukkit.entity.CreatureType; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.ServerInterface; diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitUtil.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitUtil.java index 37a99dd70..6e5ed7a07 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitUtil.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitUtil.java @@ -19,15 +19,17 @@ package com.sk89q.worldedit.bukkit; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import org.bukkit.block.*; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; import org.bukkit.entity.Player; import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.World; import com.sk89q.worldedit.*; -import com.sk89q.worldedit.Vector; public class BukkitUtil { private BukkitUtil() { diff --git a/src/main/java/com/sk89q/worldedit/commands/ChunkCommands.java b/src/main/java/com/sk89q/worldedit/commands/ChunkCommands.java index cc514ae27..2eb4c9fe4 100644 --- a/src/main/java/com/sk89q/worldedit/commands/ChunkCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/ChunkCommands.java @@ -19,7 +19,9 @@ package com.sk89q.worldedit.commands; -import java.io.*; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; import java.util.Set; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandContext; diff --git a/src/main/java/com/sk89q/worldedit/data/ChunkStore.java b/src/main/java/com/sk89q/worldedit/data/ChunkStore.java index c2745245a..29ab53871 100644 --- a/src/main/java/com/sk89q/worldedit/data/ChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/ChunkStore.java @@ -19,7 +19,7 @@ package com.sk89q.worldedit.data; -import java.io.*; +import java.io.IOException; import com.sk89q.jnbt.*; import com.sk89q.worldedit.*; diff --git a/src/main/java/com/sk89q/worldedit/data/FileLegacyChunkStore.java b/src/main/java/com/sk89q/worldedit/data/FileLegacyChunkStore.java index abb2bceac..f540cf8ed 100644 --- a/src/main/java/com/sk89q/worldedit/data/FileLegacyChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/FileLegacyChunkStore.java @@ -19,7 +19,11 @@ package com.sk89q.worldedit.data; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; /** * Represents the chunk store used by Minecraft alpha. diff --git a/src/main/java/com/sk89q/worldedit/data/LegacyChunkStore.java b/src/main/java/com/sk89q/worldedit/data/LegacyChunkStore.java index 61efc35a3..c16508c91 100644 --- a/src/main/java/com/sk89q/worldedit/data/LegacyChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/LegacyChunkStore.java @@ -23,7 +23,9 @@ import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.NBTInputStream; import com.sk89q.jnbt.Tag; import com.sk89q.worldedit.*; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.Map; import java.util.zip.GZIPInputStream; diff --git a/src/main/java/com/sk89q/worldedit/data/McRegionReader.java b/src/main/java/com/sk89q/worldedit/data/McRegionReader.java index 5339a0f03..ed6e432ba 100644 --- a/src/main/java/com/sk89q/worldedit/data/McRegionReader.java +++ b/src/main/java/com/sk89q/worldedit/data/McRegionReader.java @@ -54,8 +54,13 @@ package com.sk89q.worldedit.data; -import java.io.*; -import java.util.zip.*; +import java.io.ByteArrayInputStream; +import java.io.DataInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.zip.GZIPInputStream; +import java.util.zip.InflaterInputStream; + import com.sk89q.worldedit.Vector2D; /** diff --git a/src/main/java/com/sk89q/worldedit/data/TrueZipLegacyChunkStore.java b/src/main/java/com/sk89q/worldedit/data/TrueZipLegacyChunkStore.java index 8a5ec0f7b..d162f38c8 100644 --- a/src/main/java/com/sk89q/worldedit/data/TrueZipLegacyChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/TrueZipLegacyChunkStore.java @@ -19,11 +19,14 @@ package com.sk89q.worldedit.data; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.regex.Pattern; import java.util.zip.ZipException; import java.util.Enumeration; -import de.schlichtherle.util.zip.*; +import de.schlichtherle.util.zip.ZipEntry; +import de.schlichtherle.util.zip.ZipFile; /** * Represents the chunk store used by Minecraft alpha but zipped. Uses diff --git a/src/main/java/com/sk89q/worldedit/data/TrueZipMcRegionChunkStore.java b/src/main/java/com/sk89q/worldedit/data/TrueZipMcRegionChunkStore.java index 308d9a7c1..2f0486ecc 100644 --- a/src/main/java/com/sk89q/worldedit/data/TrueZipMcRegionChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/TrueZipMcRegionChunkStore.java @@ -18,11 +18,14 @@ */ package com.sk89q.worldedit.data; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.regex.Pattern; import java.util.zip.ZipException; import java.util.Enumeration; -import de.schlichtherle.util.zip.*; +import de.schlichtherle.util.zip.ZipEntry; +import de.schlichtherle.util.zip.ZipFile; /** * Represents the chunk store used by Minecraft but zipped. Uses diff --git a/src/main/java/com/sk89q/worldedit/data/ZippedLegacyChunkStore.java b/src/main/java/com/sk89q/worldedit/data/ZippedLegacyChunkStore.java index c084aef59..f744f908d 100644 --- a/src/main/java/com/sk89q/worldedit/data/ZippedLegacyChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/ZippedLegacyChunkStore.java @@ -19,9 +19,13 @@ package com.sk89q.worldedit.data; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.regex.Pattern; -import java.util.zip.*; +import java.util.zip.ZipEntry; +import java.util.zip.ZipException; +import java.util.zip.ZipFile; import java.util.Enumeration; /** diff --git a/src/main/java/com/sk89q/worldedit/data/ZippedMcRegionChunkStore.java b/src/main/java/com/sk89q/worldedit/data/ZippedMcRegionChunkStore.java index 7737ddc99..ee30c964e 100644 --- a/src/main/java/com/sk89q/worldedit/data/ZippedMcRegionChunkStore.java +++ b/src/main/java/com/sk89q/worldedit/data/ZippedMcRegionChunkStore.java @@ -18,9 +18,13 @@ */ package com.sk89q.worldedit.data; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.regex.Pattern; -import java.util.zip.*; +import java.util.zip.ZipEntry; +import java.util.zip.ZipException; +import java.util.zip.ZipFile; import java.util.Enumeration; /** diff --git a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java index 2d78d3b40..68d71d6d1 100644 --- a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java +++ b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java @@ -19,7 +19,10 @@ package com.sk89q.worldedit.dev; -import java.io.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/com/sk89q/worldedit/scripting/RhinoContextFactory.java b/src/main/java/com/sk89q/worldedit/scripting/RhinoContextFactory.java index 44e7e1f7c..203bf2052 100644 --- a/src/main/java/com/sk89q/worldedit/scripting/RhinoContextFactory.java +++ b/src/main/java/com/sk89q/worldedit/scripting/RhinoContextFactory.java @@ -19,7 +19,10 @@ package com.sk89q.worldedit.scripting; -import org.mozilla.javascript.*; +import org.mozilla.javascript.Callable; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.ContextFactory; +import org.mozilla.javascript.Scriptable; public class RhinoContextFactory extends ContextFactory { protected int timeLimit; diff --git a/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java b/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java index 4f907af30..f4d2ea05d 100644 --- a/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java +++ b/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java @@ -21,7 +21,14 @@ package com.sk89q.worldedit.scripting; import java.util.Map; import javax.script.ScriptException; -import org.mozilla.javascript.*; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.ImporterTopLevel; +import org.mozilla.javascript.JavaScriptException; +import org.mozilla.javascript.RhinoException; +import org.mozilla.javascript.Scriptable; +import org.mozilla.javascript.ScriptableObject; +import org.mozilla.javascript.WrappedException; + import com.sk89q.worldedit.WorldEditException; public class RhinoCraftScriptEngine implements CraftScriptEngine { diff --git a/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngine.java b/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngine.java index 5d227c370..a4195db54 100644 --- a/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngine.java +++ b/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngine.java @@ -19,9 +19,23 @@ package com.sk89q.worldedit.scripting.java; -import java.io.*; -import javax.script.*; -import org.mozilla.javascript.*; +import java.io.IOException; +import java.io.Reader; + +import javax.script.AbstractScriptEngine; +import javax.script.Bindings; +import javax.script.ScriptContext; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineFactory; +import javax.script.ScriptException; +import javax.script.SimpleBindings; + +import org.mozilla.javascript.Context; +import org.mozilla.javascript.ImporterTopLevel; +import org.mozilla.javascript.JavaScriptException; +import org.mozilla.javascript.RhinoException; +import org.mozilla.javascript.Scriptable; +import org.mozilla.javascript.ScriptableObject; import com.sk89q.worldedit.scripting.RhinoContextFactory; public class RhinoScriptEngine extends AbstractScriptEngine { diff --git a/src/main/java/com/sk89q/worldedit/snapshots/Snapshot.java b/src/main/java/com/sk89q/worldedit/snapshots/Snapshot.java index 4638df47a..5fb05e21f 100644 --- a/src/main/java/com/sk89q/worldedit/snapshots/Snapshot.java +++ b/src/main/java/com/sk89q/worldedit/snapshots/Snapshot.java @@ -19,7 +19,8 @@ package com.sk89q.worldedit.snapshots; import com.sk89q.worldedit.data.*; -import java.io.*; +import java.io.File; +import java.io.IOException; import java.util.Calendar; import java.util.logging.Logger; import java.util.zip.ZipFile; diff --git a/src/main/java/com/sk89q/worldedit/snapshots/SnapshotRepository.java b/src/main/java/com/sk89q/worldedit/snapshots/SnapshotRepository.java index 77db98df7..cbca4be3f 100644 --- a/src/main/java/com/sk89q/worldedit/snapshots/SnapshotRepository.java +++ b/src/main/java/com/sk89q/worldedit/snapshots/SnapshotRepository.java @@ -19,7 +19,8 @@ package com.sk89q.worldedit.snapshots; import com.sk89q.worldedit.data.MissingWorldException; -import java.io.*; +import java.io.File; +import java.io.FilenameFilter; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; diff --git a/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java b/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java index e59e59e25..26c83d336 100644 --- a/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java +++ b/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java @@ -19,7 +19,7 @@ package com.sk89q.worldedit.util; -import java.io.*; +import java.io.File; import java.util.Arrays; import java.util.HashSet; import java.util.Set; diff --git a/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java b/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java index 6ad62c81a..e8384bbfe 100644 --- a/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java +++ b/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java @@ -18,7 +18,13 @@ */ package com.sk89q.worldedit.util; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.util.HashSet; import java.util.Properties; import java.util.Set; diff --git a/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java b/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java index 2f833b9d8..e6bf25e21 100644 --- a/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java +++ b/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java @@ -2,7 +2,10 @@ package com.sk89q.wepif; import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; -import org.bukkit.permissions.*; +import org.bukkit.permissions.Permissible; +import org.bukkit.permissions.Permission; +import org.bukkit.permissions.PermissionAttachment; +import org.bukkit.permissions.PermissionAttachmentInfo; import org.bukkit.plugin.Plugin; import java.util.HashMap;