From f2a9b248754b4fd91c0ae69d659a8bbf64ed4929 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 14 May 2017 12:00:00 +1000 Subject: Remove some more long deprecated methods (3+ years) --- src/main/java/org/bukkit/OfflinePlayer.java | 11 -------- .../configuration/file/FileConfiguration.java | 22 --------------- .../configuration/file/YamlConfiguration.java | 32 ---------------------- 3 files changed, 65 deletions(-) diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java index e98706a6..3ab2e4c7 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java @@ -41,17 +41,6 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio */ public boolean isBanned(); - /** - * Bans or unbans this player - * - * @param banned true if banned - * @deprecated Use {@link org.bukkit.BanList#addBan(String, String, Date, - * String)} or {@link org.bukkit.BanList#pardon(String)} to enhance - * functionality - */ - @Deprecated - public void setBanned(boolean banned); - /** * Checks if this player is whitelisted or not * diff --git a/src/main/java/org/bukkit/configuration/file/FileConfiguration.java b/src/main/java/org/bukkit/configuration/file/FileConfiguration.java index 5c1a3fde..6767d34a 100644 --- a/src/main/java/org/bukkit/configuration/file/FileConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/FileConfiguration.java @@ -130,28 +130,6 @@ public abstract class FileConfiguration extends MemoryConfiguration { load(new InputStreamReader(stream, Charsets.UTF_8)); } - /** - * Loads this {@link FileConfiguration} from the specified stream. - *

- * All the values contained within this configuration will be removed, - * leaving only settings and defaults, and the new values will be loaded - * from the given stream. - * - * @param stream Stream to load from - * @throws IOException Thrown when the given file cannot be read. - * @throws InvalidConfigurationException Thrown when the given file is not - * a valid Configuration. - * @throws IllegalArgumentException Thrown when stream is null. - * @deprecated This does not consider encoding - * @see #load(Reader) - */ - @Deprecated - public void load(InputStream stream) throws IOException, InvalidConfigurationException { - Validate.notNull(stream, "Stream cannot be null"); - - load(new InputStreamReader(stream, Charsets.UTF_8)); - } - /** * Loads this {@link FileConfiguration} from the specified reader. *

diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java index c7f28084..6f082731 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java @@ -187,38 +187,6 @@ public class YamlConfiguration extends FileConfiguration { return config; } - /** - * Creates a new {@link YamlConfiguration}, loading from the given stream. - *

- * Any errors loading the Configuration will be logged and then ignored. - * If the specified input is not a valid config, a blank config will be - * returned. - * - * @param stream Input stream - * @return Resulting configuration - * @throws IllegalArgumentException Thrown if stream is null - * @deprecated does not properly consider encoding - * @see #load(InputStream) - * @see #loadConfiguration(Reader) - */ - @Deprecated - public static YamlConfiguration loadConfiguration(InputStream stream) { - Validate.notNull(stream, "Stream cannot be null"); - - YamlConfiguration config = new YamlConfiguration(); - - try { - config.load(stream); - } catch (IOException ex) { - Bukkit.getLogger().log(Level.SEVERE, "Cannot load configuration from stream", ex); - } catch (InvalidConfigurationException ex) { - Bukkit.getLogger().log(Level.SEVERE, "Cannot load configuration from stream", ex); - } - - return config; - } - - /** * Creates a new {@link YamlConfiguration}, loading from the given reader. *

-- cgit v1.2.3