mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:31:33 +01:00
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:
parent
c53cad6baa
commit
66cea125d6
@ -1,6 +1,5 @@
|
||||
package org.bukkit;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.bukkit.conversations;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,7 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Location;
|
||||
|
||||
/**
|
||||
* Represents a Primed TNT.
|
||||
*/
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user