From 4b47200f27c310eafdc89e1ab1595b35f769530d Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Mon, 26 Dec 2011 00:06:50 +0100 Subject: [PATCH] Fixed some warnings. --- .../java/com/sk89q/bukkit/util/CommandRegistration.java | 1 - src/main/java/com/sk89q/util/ReflectionUtil.java | 1 + .../com/sk89q/worldedit/bukkit/BukkitCommandSender.java | 1 - .../com/sk89q/worldedit/bukkit/BukkitServerInterface.java | 8 -------- .../com/sk89q/worldedit/dev/DocumentationPrinter.java | 1 - 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java b/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java index 869cf2450..560715ff3 100644 --- a/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java +++ b/src/main/java/com/sk89q/bukkit/util/CommandRegistration.java @@ -19,7 +19,6 @@ package com.sk89q.bukkit.util; import com.sk89q.minecraft.util.commands.Command; -import com.sk89q.minecraft.util.commands.CommandsManager; import com.sk89q.util.ReflectionUtil; import org.bukkit.Bukkit; import org.bukkit.command.CommandMap; diff --git a/src/main/java/com/sk89q/util/ReflectionUtil.java b/src/main/java/com/sk89q/util/ReflectionUtil.java index 6e1e4b021..97d602649 100644 --- a/src/main/java/com/sk89q/util/ReflectionUtil.java +++ b/src/main/java/com/sk89q/util/ReflectionUtil.java @@ -24,6 +24,7 @@ import java.lang.reflect.Field; * @author zml2008 */ public class ReflectionUtil { + @SuppressWarnings("unchecked") public static T getField(Object from, String name) { Class checkClass = from.getClass(); do { diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandSender.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandSender.java index 6773bbe1c..b42a9fb18 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandSender.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandSender.java @@ -1,6 +1,5 @@ package com.sk89q.worldedit.bukkit; -import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java index a132294b4..32cb29c71 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java @@ -23,19 +23,11 @@ import java.util.ArrayList; import java.util.List; import com.sk89q.bukkit.util.CommandRegistration; -import com.sk89q.bukkit.util.DynamicPluginCommand; -import com.sk89q.bukkit.util.FallbackRegistrationListener; -import com.sk89q.util.ReflectionUtil; import com.sk89q.minecraft.util.commands.Command; import org.bukkit.*; -import org.bukkit.command.CommandMap; -import org.bukkit.command.SimpleCommandMap; import org.bukkit.entity.CreatureType; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.ServerInterface; -import org.bukkit.event.Event; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; -import org.bukkit.event.player.PlayerListener; public class BukkitServerInterface extends ServerInterface { public Server server; diff --git a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java index 803af0227..2d78d3b40 100644 --- a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java +++ b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java @@ -27,7 +27,6 @@ import java.util.List; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandPermissions; import com.sk89q.minecraft.util.commands.NestedCommand; -import com.sk89q.util.StringUtil; import com.sk89q.worldedit.commands.ChunkCommands; import com.sk89q.worldedit.commands.ClipboardCommands; import com.sk89q.worldedit.commands.GeneralCommands;