diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index 7d082260..a4e44b6a 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -7,21 +7,6 @@ package com.onarandombox.MultiverseCore; -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - import buscript.Buscript; import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.MVWorld.NullLocation; @@ -120,6 +105,20 @@ import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPluginLoader; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + /** * The implementation of the Multiverse-{@link Core}. */ @@ -837,47 +836,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { } } - /** - * {@inheritDoc} - * - * @deprecated This is now deprecated, nobody needs it any longer. - * All logging is now done with {@link Logging}. - */ - @Override - @Deprecated - public void log(Level level, String msg) { - Logging.log(level, msg); - } - - /** - * Logs a message at the specified level. - * - * @param level The Log-{@link Level}. - * @param msg The message to log. - * - * @deprecated Replaced by {@link Logging}. Please refrain from using this from a third party plugin as the - * messages will appear to originate from Multiverse-Core. - */ - @Deprecated - public static void staticLog(Level level, String msg) { - Logging.log(level, msg); - } - - /** - * Print messages to the Debug Log, if the servers in Debug Mode then we also want to print the messages to the - * standard Server Console. - * - * @param level The Log-{@link Level} - * @param msg The message - * - * @deprecated Replaced by {@link Logging}. Please refrain from using this from a third party plugin as the - * messages will appear to originate from Multiverse-Core. - */ - @Deprecated - public static void staticDebugLog(Level level, String msg) { - Logging.log(level, msg); - } - /** * {@inheritDoc} */ @@ -928,16 +886,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { return commandQueueManager; } - /** - * Gets the log-tag. - * - * @return The log-tag - */ - // TODO this should be static! - public String getTag() { - return MultiverseCore.LOG_TAG; - } - /** * Shows a message that the given world is not a MultiverseWorld. * diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/LoggablePlugin.java b/src/main/java/com/onarandombox/MultiverseCore/api/LoggablePlugin.java deleted file mode 100644 index 56852e45..00000000 --- a/src/main/java/com/onarandombox/MultiverseCore/api/LoggablePlugin.java +++ /dev/null @@ -1,36 +0,0 @@ -/****************************************************************************** - * Multiverse 2 Copyright (c) the Multiverse Team 2011. * - * Multiverse 2 is licensed under the BSD License. * - * For more information please check the README.md file included * - * with this project. * - ******************************************************************************/ - -package com.onarandombox.MultiverseCore.api; - -import com.dumptruckman.minecraft.util.Logging; -import org.bukkit.Server; - -import java.util.logging.Level; - -/** - * A simple API to require plugins to have a log method. - * - * @deprecated Replaced by {@link Logging}. - * */ -@Deprecated -public interface LoggablePlugin { - /** - * Logs a message at the specified level. - * - * @param level The Log-{@link Level}. - * @param msg The message to log. - */ - void log(Level level, String msg); - - /** - * Gets the server instance that this plugin is attached to. - * - * @return A {@link Server} instance. - */ - Server getServer(); -} diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/MVPlugin.java b/src/main/java/com/onarandombox/MultiverseCore/api/MVPlugin.java index e70cd35d..a9582edf 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/api/MVPlugin.java +++ b/src/main/java/com/onarandombox/MultiverseCore/api/MVPlugin.java @@ -13,7 +13,7 @@ import com.onarandombox.MultiverseCore.event.MVVersionEvent; /** * This interface is implemented by every official Multiverse-plugin. */ -public interface MVPlugin extends LoggablePlugin { +public interface MVPlugin { /** * Adds This plugin's version information to the buffer and returns the new string. * diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/MultiversePlugin.java b/src/main/java/com/onarandombox/MultiverseCore/api/MultiversePlugin.java index a6a064b8..28bbc919 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/api/MultiversePlugin.java +++ b/src/main/java/com/onarandombox/MultiverseCore/api/MultiversePlugin.java @@ -115,33 +115,6 @@ public abstract class MultiversePlugin extends JavaPlugin implements MVPlugin { return this.getCore().getCommandHandler().locateAndRunCommand(sender, allArgs); } - @Override - public void log(Level level, String msg) { - int debugLevel = this.getCore().getMVConfig().getGlobalDebug(); - if ((level == Level.FINE && debugLevel >= 1) || (level == Level.FINER && debugLevel >= 2) - || (level == Level.FINEST && debugLevel >= 3)) { - debugLog.log(level, msg); - } else if (level != Level.FINE && level != Level.FINER && level != Level.FINEST) { - String message = new StringBuilder(getLogTag()).append(msg).toString(); - this.getServer().getLogger().log(level, message); - debugLog.log(level, message); - } - } - - private String getLogTag() { - if (logTag == null) - logTag = String.format("[%s]", this.getDescription().getName()); - return logTag; - } - - /** - * Sets the debug log-tag. - * @param tag The new tag. - */ - protected final void setDebugLogTag(String tag) { - this.debugLog.setTag(tag); - } - @Override public final String dumpVersionInfo(String buffer) { throw new UnsupportedOperationException("This is gone.");