diff options
author | Parker Hawke <hawkeboyz2@hotmail.com> | 2018-10-27 14:55:52 -0400 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-11-02 18:07:16 +1100 |
commit | 01e534c6d0d8802a7c9f6fc2ee26a09ed5fa9d5d (patch) | |
tree | d1d33500ec8f000ff57e5cd75bb565beede360eb /src | |
parent | 98d3f031c31269cf6997d3c4a92bb36620ad4731 (diff) | |
download | bukkit-01e534c6d0d8802a7c9f6fc2ee26a09ed5fa9d5d.tar bukkit-01e534c6d0d8802a7c9f6fc2ee26a09ed5fa9d5d.tar.gz bukkit-01e534c6d0d8802a7c9f6fc2ee26a09ed5fa9d5d.tar.lz bukkit-01e534c6d0d8802a7c9f6fc2ee26a09ed5fa9d5d.tar.xz bukkit-01e534c6d0d8802a7c9f6fc2ee26a09ed5fa9d5d.zip |
Minor cosmetic cleanups to imports etc
Please see https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/389/overview
Diffstat (limited to 'src')
25 files changed, 10 insertions, 55 deletions
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java index 3ab2e4c7..d8279071 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java @@ -1,6 +1,5 @@ package org.bukkit; -import java.util.Date; import java.util.UUID; import org.bukkit.configuration.serialization.ConfigurationSerializable; diff --git a/src/main/java/org/bukkit/block/data/type/Slab.java b/src/main/java/org/bukkit/block/data/type/Slab.java index 4e675a50..a6900744 100644 --- a/src/main/java/org/bukkit/block/data/type/Slab.java +++ b/src/main/java/org/bukkit/block/data/type/Slab.java @@ -1,13 +1,12 @@ package org.bukkit.block.data.type; -import org.bukkit.block.data.BlockData; import org.bukkit.block.data.Waterlogged; /** * 'type' represents what state the slab is in - either top, bottom, or a double * slab occupying the full block. */ -public interface Slab extends BlockData, Waterlogged { +public interface Slab extends Waterlogged { /** * Gets the value of the 'type' property. diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java index d00bad28..c77623f4 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -8,6 +8,7 @@ import java.util.Set; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.ChatColor; +import org.bukkit.GameRule; import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.entity.Player; @@ -389,14 +390,14 @@ public abstract class Command { if (source instanceof BlockCommandSender) { BlockCommandSender blockCommandSender = (BlockCommandSender) source; - if (blockCommandSender.getBlock().getWorld().getGameRuleValue("commandBlockOutput").equalsIgnoreCase("false")) { + if (!blockCommandSender.getBlock().getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) { Bukkit.getConsoleSender().sendMessage(result); return; } } else if (source instanceof CommandMinecart) { CommandMinecart commandMinecart = (CommandMinecart) source; - if (commandMinecart.getWorld().getGameRuleValue("commandBlockOutput").equalsIgnoreCase("false")) { + if (!commandMinecart.getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) { Bukkit.getConsoleSender().sendMessage(result); return; } diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java index ba55a9ce..9eeafaf9 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -8,7 +8,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; import org.apache.commons.lang.Validate; import org.bukkit.Location; diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java index 760d58eb..5a994953 100644 --- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java +++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java @@ -22,8 +22,6 @@ import java.net.URLEncoder; import java.util.HashSet; import java.util.Set; import java.util.concurrent.locks.ReentrantLock; -import java.util.logging.Level; -import java.util.logging.Logger; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; diff --git a/src/main/java/org/bukkit/configuration/file/FileConfiguration.java b/src/main/java/org/bukkit/configuration/file/FileConfiguration.java index 6767d34a..dd56c41e 100644 --- a/src/main/java/org/bukkit/configuration/file/FileConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/FileConfiguration.java @@ -12,12 +12,10 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; -import java.nio.charset.Charset; import org.bukkit.configuration.Configuration; import org.bukkit.configuration.MemoryConfiguration; diff --git a/src/main/java/org/bukkit/conversations/Conversable.java b/src/main/java/org/bukkit/conversations/Conversable.java index 55674b53..d1e5c7dd 100644 --- a/src/main/java/org/bukkit/conversations/Conversable.java +++ b/src/main/java/org/bukkit/conversations/Conversable.java @@ -1,7 +1,5 @@ package org.bukkit.conversations; -import org.bukkit.command.CommandSender; - /** * The Conversable interface is used to indicate objects that can have * conversations. diff --git a/src/main/java/org/bukkit/conversations/ConversationPrefix.java b/src/main/java/org/bukkit/conversations/ConversationPrefix.java index 9889f17e..3febfa6a 100644 --- a/src/main/java/org/bukkit/conversations/ConversationPrefix.java +++ b/src/main/java/org/bukkit/conversations/ConversationPrefix.java @@ -1,7 +1,5 @@ package org.bukkit.conversations; -import org.bukkit.command.CommandSender; - /** * A ConversationPrefix implementation prepends all output from the * conversation to the player. The ConversationPrefix can be used to display diff --git a/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java b/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java index 2290979c..dcb7e24a 100644 --- a/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java +++ b/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java @@ -1,7 +1,6 @@ package org.bukkit.conversations; import org.bukkit.ChatColor; -import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; /** diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java index 144e432c..71e52b48 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -12,12 +12,11 @@ import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; -import org.bukkit.permissions.Permissible; /** * Represents a human entity, such as an NPC or a player */ -public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, InventoryHolder { +public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder { /** * Returns the name of this player diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index ed1d5064..8cf98673 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -1,7 +1,6 @@ package org.bukkit.entity; import java.util.Collection; -import java.util.HashSet; import java.util.List; import java.util.Set; @@ -21,7 +20,7 @@ import org.bukkit.util.Vector; /** * Represents a living entity, such as a monster or player */ -public interface LivingEntity extends Attributable, Entity, Damageable, ProjectileSource { +public interface LivingEntity extends Attributable, Damageable, ProjectileSource { /** * Gets the height of the living entity's eyes above its Location. diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java index 65bd4bea..22e8dcaf 100644 --- a/src/main/java/org/bukkit/entity/Minecart.java +++ b/src/main/java/org/bukkit/entity/Minecart.java @@ -1,6 +1,5 @@ package org.bukkit.entity; -import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.material.MaterialData; import org.bukkit.util.Vector; diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index c7e58249..c327bff3 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -19,7 +19,6 @@ import org.bukkit.WeatherType; import org.bukkit.advancement.Advancement; import org.bukkit.advancement.AdvancementProgress; import org.bukkit.block.data.BlockData; -import org.bukkit.command.CommandSender; import org.bukkit.conversations.Conversable; import org.bukkit.event.player.PlayerResourcePackStatusEvent; import org.bukkit.map.MapView; @@ -30,7 +29,7 @@ import org.bukkit.scoreboard.Scoreboard; /** * Represents a player, connected or not */ -public interface Player extends HumanEntity, Conversable, CommandSender, OfflinePlayer, PluginMessageRecipient { +public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient { /** * Gets the "friendly" name to display of this player. This may include diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java index fcd0a9b2..a439eaf5 100644 --- a/src/main/java/org/bukkit/entity/TNTPrimed.java +++ b/src/main/java/org/bukkit/entity/TNTPrimed.java @@ -1,5 +1,7 @@ package org.bukkit.entity; +import org.bukkit.Location; + /** * Represents a Primed TNT. */ diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java index e5026807..75649cf3 100644 --- a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java +++ b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java @@ -1,9 +1,8 @@ package org.bukkit.entity.minecart; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Minecart; -public interface CommandMinecart extends Minecart, CommandSender { +public interface CommandMinecart extends Minecart { /** * Gets the command that this CommandMinecart will run when activated. diff --git a/src/main/java/org/bukkit/event/block/BlockBreakEvent.java b/src/main/java/org/bukkit/event/block/BlockBreakEvent.java index b6c95cc1..d1b5f7c5 100644 --- a/src/main/java/org/bukkit/event/block/BlockBreakEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockBreakEvent.java @@ -3,7 +3,6 @@ package org.bukkit.event.block; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; -import org.bukkit.event.HandlerList; /** * Called when a block is broken by a player. diff --git a/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java b/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java index 849b69fc..509382ff 100644 --- a/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java +++ b/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java @@ -1,15 +1,9 @@ package org.bukkit.event.entity; -import java.util.ArrayList; -import java.util.Collection; import java.util.List; -import java.util.Map; -import org.apache.commons.lang.Validate; import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.ThrownPotion; -import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; /** diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java index 73a26ba8..ed5da79e 100644 --- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java +++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java @@ -1,7 +1,6 @@ package org.bukkit.event.entity; import org.bukkit.Location; -import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java index b9152588..26c4c256 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java @@ -9,7 +9,6 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; -import org.bukkit.util.NumberConversions; import com.google.common.base.Function; import com.google.common.base.Functions; diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java index 1dd50c56..976b80b7 100644 --- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java @@ -3,7 +3,6 @@ package org.bukkit.event.entity; import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; -import org.bukkit.util.NumberConversions; /** * Stores data for health-regain events diff --git a/src/main/java/org/bukkit/event/entity/LingeringPotionSplashEvent.java b/src/main/java/org/bukkit/event/entity/LingeringPotionSplashEvent.java index 09861a5b..dda37d6b 100644 --- a/src/main/java/org/bukkit/event/entity/LingeringPotionSplashEvent.java +++ b/src/main/java/org/bukkit/event/entity/LingeringPotionSplashEvent.java @@ -1,13 +1,7 @@ package org.bukkit.event.entity; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; - -import org.apache.commons.lang.Validate; import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.LingeringPotion; -import org.bukkit.entity.LivingEntity; import org.bukkit.entity.ThrownPotion; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; diff --git a/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java index 8624f8d7..627cd0fd 100644 --- a/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java +++ b/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java @@ -2,9 +2,7 @@ package org.bukkit.event.inventory; import org.bukkit.entity.HumanEntity; import org.bukkit.event.Cancellable; -import org.bukkit.event.Event.Result; import org.bukkit.inventory.InventoryView; -import org.bukkit.inventory.ItemStack; /** * An abstract base class for events that describe an interaction between a diff --git a/src/main/java/org/bukkit/inventory/meta/PotionMeta.java b/src/main/java/org/bukkit/inventory/meta/PotionMeta.java index d9151259..e9865054 100644 --- a/src/main/java/org/bukkit/inventory/meta/PotionMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/PotionMeta.java @@ -4,7 +4,6 @@ import org.bukkit.Color; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionData; -import org.bukkit.potion.PotionType; import java.util.List; diff --git a/src/main/java/org/bukkit/metadata/FixedMetadataValue.java b/src/main/java/org/bukkit/metadata/FixedMetadataValue.java index bce6f000..5f485739 100644 --- a/src/main/java/org/bukkit/metadata/FixedMetadataValue.java +++ b/src/main/java/org/bukkit/metadata/FixedMetadataValue.java @@ -2,8 +2,6 @@ package org.bukkit.metadata; import org.bukkit.plugin.Plugin; -import java.util.concurrent.Callable; - /** * A FixedMetadataValue is a special case metadata item that contains the same * value forever after initialization. Invalidating a FixedMetadataValue has diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index 7035e755..67887806 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -9,32 +9,24 @@ import java.io.OutputStream; import java.io.Reader; import java.net.URL; import java.net.URLConnection; -import java.nio.charset.Charset; -import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.lang.Validate; import org.bukkit.Server; -import org.bukkit.Warning.WarningState; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.PluginCommand; -import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.generator.ChunkGenerator; -import org.bukkit.plugin.AuthorNagException; -import org.bukkit.plugin.PluginAwareness; import org.bukkit.plugin.PluginBase; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginLoader; import org.bukkit.plugin.PluginLogger; import com.google.common.base.Charsets; -import com.google.common.base.Preconditions; -import com.google.common.io.ByteStreams; /** * Represents a Java plugin @@ -147,14 +139,12 @@ public abstract class JavaPlugin extends PluginBase { * @throws IllegalArgumentException if file is null * @see ClassLoader#getResourceAsStream(String) */ - @SuppressWarnings("deprecation") protected final Reader getTextResource(String file) { final InputStream in = getResource(file); return in == null ? null : new InputStreamReader(in, Charsets.UTF_8); } - @SuppressWarnings("deprecation") @Override public void reloadConfig() { newConfig = YamlConfiguration.loadConfiguration(configFile); |