Minor cosmetic cleanups to imports etc

Please see https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/389/overview

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot
2018-10-27 14:55:52 -04:00
parent c53cad6baa
commit 66cea125d6
25 changed files with 10 additions and 55 deletions

View File

@@ -1,6 +1,5 @@
package org.bukkit; package org.bukkit;
import java.util.Date;
import java.util.UUID; import java.util.UUID;
import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.configuration.serialization.ConfigurationSerializable;

View File

@@ -1,13 +1,12 @@
package org.bukkit.block.data.type; package org.bukkit.block.data.type;
import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.Waterlogged; import org.bukkit.block.data.Waterlogged;
/** /**
* 'type' represents what state the slab is in - either top, bottom, or a double * 'type' represents what state the slab is in - either top, bottom, or a double
* slab occupying the full block. * slab occupying the full block.
*/ */
public interface Slab extends BlockData, Waterlogged { public interface Slab extends Waterlogged {
/** /**
* Gets the value of the 'type' property. * Gets the value of the 'type' property.

View File

@@ -8,6 +8,7 @@ import java.util.Set;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.GameRule;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Server; import org.bukkit.Server;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@@ -389,14 +390,14 @@ public abstract class Command {
if (source instanceof BlockCommandSender) { if (source instanceof BlockCommandSender) {
BlockCommandSender blockCommandSender = (BlockCommandSender) source; 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); Bukkit.getConsoleSender().sendMessage(result);
return; return;
} }
} else if (source instanceof CommandMinecart) { } else if (source instanceof CommandMinecart) {
CommandMinecart commandMinecart = (CommandMinecart) source; CommandMinecart commandMinecart = (CommandMinecart) source;
if (commandMinecart.getWorld().getGameRuleValue("commandBlockOutput").equalsIgnoreCase("false")) { if (!commandMinecart.getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) {
Bukkit.getConsoleSender().sendMessage(result); Bukkit.getConsoleSender().sendMessage(result);
return; return;
} }

View File

@@ -8,7 +8,6 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Pattern;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Location; import org.bukkit.Location;

View File

@@ -22,8 +22,6 @@ import java.net.URLEncoder;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.concurrent.locks.ReentrantLock; 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.JSONObject;
import org.json.simple.parser.JSONParser; import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException; import org.json.simple.parser.ParseException;

View File

@@ -12,12 +12,10 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.Reader; import java.io.Reader;
import java.io.Writer; import java.io.Writer;
import java.nio.charset.Charset;
import org.bukkit.configuration.Configuration; import org.bukkit.configuration.Configuration;
import org.bukkit.configuration.MemoryConfiguration; import org.bukkit.configuration.MemoryConfiguration;

View File

@@ -1,7 +1,5 @@
package org.bukkit.conversations; package org.bukkit.conversations;
import org.bukkit.command.CommandSender;
/** /**
* The Conversable interface is used to indicate objects that can have * The Conversable interface is used to indicate objects that can have
* conversations. * conversations.

View File

@@ -1,7 +1,5 @@
package org.bukkit.conversations; package org.bukkit.conversations;
import org.bukkit.command.CommandSender;
/** /**
* A ConversationPrefix implementation prepends all output from the * A ConversationPrefix implementation prepends all output from the
* conversation to the player. The ConversationPrefix can be used to display * conversation to the player. The ConversationPrefix can be used to display

View File

@@ -1,7 +1,6 @@
package org.bukkit.conversations; package org.bukkit.conversations;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
/** /**

View File

@@ -12,12 +12,11 @@ import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.PlayerInventory;
import org.bukkit.permissions.Permissible;
/** /**
* Represents a human entity, such as an NPC or a player * 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 * Returns the name of this player

View File

@@ -1,7 +1,6 @@
package org.bukkit.entity; package org.bukkit.entity;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@@ -21,7 +20,7 @@ import org.bukkit.util.Vector;
/** /**
* Represents a living entity, such as a monster or player * 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. * Gets the height of the living entity's eyes above its Location.

View File

@@ -1,6 +1,5 @@
package org.bukkit.entity; package org.bukkit.entity;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.material.MaterialData; import org.bukkit.material.MaterialData;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;

View File

@@ -19,7 +19,6 @@ import org.bukkit.WeatherType;
import org.bukkit.advancement.Advancement; import org.bukkit.advancement.Advancement;
import org.bukkit.advancement.AdvancementProgress; import org.bukkit.advancement.AdvancementProgress;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.command.CommandSender;
import org.bukkit.conversations.Conversable; import org.bukkit.conversations.Conversable;
import org.bukkit.event.player.PlayerResourcePackStatusEvent; import org.bukkit.event.player.PlayerResourcePackStatusEvent;
import org.bukkit.map.MapView; import org.bukkit.map.MapView;
@@ -30,7 +29,7 @@ import org.bukkit.scoreboard.Scoreboard;
/** /**
* Represents a player, connected or not * 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 * Gets the "friendly" name to display of this player. This may include

View File

@@ -1,5 +1,7 @@
package org.bukkit.entity; package org.bukkit.entity;
import org.bukkit.Location;
/** /**
* Represents a Primed TNT. * Represents a Primed TNT.
*/ */

View File

@@ -1,9 +1,8 @@
package org.bukkit.entity.minecart; package org.bukkit.entity.minecart;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Minecart; 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. * Gets the command that this CommandMinecart will run when activated.

View File

@@ -3,7 +3,6 @@ package org.bukkit.event.block;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/** /**
* Called when a block is broken by a player. * Called when a block is broken by a player.

View File

@@ -1,15 +1,9 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map;
import org.apache.commons.lang.Validate;
import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
/** /**

View File

@@ -1,7 +1,6 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;

View File

@@ -9,7 +9,6 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.util.NumberConversions;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Functions; import com.google.common.base.Functions;

View File

@@ -3,7 +3,6 @@ package org.bukkit.event.entity;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.util.NumberConversions;
/** /**
* Stores data for health-regain events * Stores data for health-regain events

View File

@@ -1,13 +1,7 @@
package org.bukkit.event.entity; 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.AreaEffectCloud;
import org.bukkit.entity.LingeringPotion; import org.bukkit.entity.LingeringPotion;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;

View File

@@ -2,9 +2,7 @@ package org.bukkit.event.inventory;
import org.bukkit.entity.HumanEntity; import org.bukkit.entity.HumanEntity;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.Event.Result;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
/** /**
* An abstract base class for events that describe an interaction between a * An abstract base class for events that describe an interaction between a

View File

@@ -4,7 +4,6 @@ import org.bukkit.Color;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionType;
import java.util.List; import java.util.List;

View File

@@ -2,8 +2,6 @@ package org.bukkit.metadata;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import java.util.concurrent.Callable;
/** /**
* A FixedMetadataValue is a special case metadata item that contains the same * A FixedMetadataValue is a special case metadata item that contains the same
* value forever after initialization. Invalidating a FixedMetadataValue has * value forever after initialization. Invalidating a FixedMetadataValue has

View File

@@ -9,32 +9,24 @@ import java.io.OutputStream;
import java.io.Reader; import java.io.Reader;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Server; import org.bukkit.Server;
import org.bukkit.Warning.WarningState;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.AuthorNagException;
import org.bukkit.plugin.PluginAwareness;
import org.bukkit.plugin.PluginBase; import org.bukkit.plugin.PluginBase;
import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginLoader; import org.bukkit.plugin.PluginLoader;
import org.bukkit.plugin.PluginLogger; import org.bukkit.plugin.PluginLogger;
import com.google.common.base.Charsets; import com.google.common.base.Charsets;
import com.google.common.base.Preconditions;
import com.google.common.io.ByteStreams;
/** /**
* Represents a Java plugin * Represents a Java plugin
@@ -147,14 +139,12 @@ public abstract class JavaPlugin extends PluginBase {
* @throws IllegalArgumentException if file is null * @throws IllegalArgumentException if file is null
* @see ClassLoader#getResourceAsStream(String) * @see ClassLoader#getResourceAsStream(String)
*/ */
@SuppressWarnings("deprecation")
protected final Reader getTextResource(String file) { protected final Reader getTextResource(String file) {
final InputStream in = getResource(file); final InputStream in = getResource(file);
return in == null ? null : new InputStreamReader(in, Charsets.UTF_8); return in == null ? null : new InputStreamReader(in, Charsets.UTF_8);
} }
@SuppressWarnings("deprecation")
@Override @Override
public void reloadConfig() { public void reloadConfig() {
newConfig = YamlConfiguration.loadConfiguration(configFile); newConfig = YamlConfiguration.loadConfiguration(configFile);