diff --git a/src/main/java/com/comphenix/protocol/ProtocolConfig.java b/src/main/java/com/comphenix/protocol/ProtocolConfig.java index bab93689..75264056 100644 --- a/src/main/java/com/comphenix/protocol/ProtocolConfig.java +++ b/src/main/java/com/comphenix/protocol/ProtocolConfig.java @@ -46,7 +46,7 @@ public class ProtocolConfig { private static final String DEBUG_MODE_ENABLED = "debug"; private static final String DETAILED_ERROR = "detailed error"; - private static final String INJECTION_METHOD = "injection method"; + private static final String CHAT_WARNINGS = "chat warnings"; private static final String SCRIPT_ENGINE_NAME = "script engine"; private static final String SUPPRESSED_REPORTS = "suppressed reports"; @@ -225,12 +225,11 @@ public class ProtocolConfig { } /** - * Set whether or not detailed error reporting is enabled. - * - * @param value - TRUE if it is enabled, FALSE otherwise. + * Print warnings to players with protocol.info + * @return true if enabled, false if not */ - public void setDetailedErrorReporting(boolean value) { - global.set(DETAILED_ERROR, value); + public boolean isChatWarnings() { + return getGlobalValue(CHAT_WARNINGS, true); } /** @@ -242,16 +241,6 @@ public class ProtocolConfig { return getUpdaterValue(UPDATER_NOTIFY, true); } - /** - * Set whether or not ProtocolLib should determine if a new version has been released. - * - * @param value - TRUE to do this automatically, FALSE otherwise. - */ - public void setAutoNotify(boolean value) { - setConfig(updater, UPDATER_NOTIFY, value); - modCount++; - } - /** * Retrieve whether or not ProtocolLib should automatically download the new version. * @@ -261,16 +250,6 @@ public class ProtocolConfig { return updater != null && getUpdaterValue(UPDATER_DOWNLAD, false); } - /** - * Set whether or not ProtocolLib should automatically download the new version. - * - * @param value - TRUE if it should. FALSE otherwise. - */ - public void setAutoDownload(boolean value) { - setConfig(updater, UPDATER_DOWNLAD, value); - modCount++; - } - /** * Determine whether or not debug mode is enabled. *
@@ -301,16 +280,6 @@ public class ProtocolConfig {
return ImmutableList.copyOf(getGlobalValue(SUPPRESSED_REPORTS, new ArrayList
- * This time must be greater than 59 seconds.
- *
- * @param delaySeconds - the amount of time to wait.
- */
- public void setAutoDelay(long delaySeconds) {
- // Silently fix the delay
- if (delaySeconds < DEFAULT_UPDATER_DELAY) {
- delaySeconds = DEFAULT_UPDATER_DELAY;
- }
- setConfig(updater, UPDATER_DELAY, delaySeconds);
- modCount++;
- }
-
/**
* The version of Minecraft to ignore the built-in safety feature.
*
@@ -346,18 +299,6 @@ public class ProtocolConfig {
return getGlobalValue(IGNORE_VERSION_CHECK, "");
}
- /**
- * Sets under which version of Minecraft the version safety feature will be ignored.
- *
- * This is useful if a server operator has tested and verified that a version of ProtocolLib works, but doesn't want or can't upgrade to a newer version.
- *
- * @param ignoreVersion - the version of Minecraft where the satefy will be disabled.
- */
- public void setIgnoreVersionCheck(String ignoreVersion) {
- setConfig(global, IGNORE_VERSION_CHECK, ignoreVersion);
- modCount++;
- }
-
/**
* Retrieve whether or not metrics is enabled.
*
@@ -367,18 +308,6 @@ public class ProtocolConfig {
return getGlobalValue(METRICS_ENABLED, true);
}
- /**
- * Set whether or not metrics is enabled.
- *
- * This setting will take effect next time ProtocolLib is started.
- *
- * @param enabled - whether or not metrics is enabled.
- */
- public void setMetricsEnabled(boolean enabled) {
- setConfig(global, METRICS_ENABLED, enabled);
- modCount++;
- }
-
/**
* Retrieve whether or not the background compiler for structure modifiers is enabled or not.
*
@@ -388,18 +317,6 @@ public class ProtocolConfig {
return getGlobalValue(BACKGROUND_COMPILER_ENABLED, true);
}
- /**
- * Set whether or not the background compiler for structure modifiers is enabled or not.
- *
- * This setting will take effect next time ProtocolLib is started.
- *
- * @param enabled - TRUE if is enabled/running, FALSE otherwise.
- */
- public void setBackgroundCompilerEnabled(boolean enabled) {
- setConfig(global, BACKGROUND_COMPILER_ENABLED, enabled);
- modCount++;
- }
-
/**
* Retrieve the last time we updated, in seconds since 1970.01.01 00:00.
*
diff --git a/src/main/java/com/comphenix/protocol/error/DetailedErrorReporter.java b/src/main/java/com/comphenix/protocol/error/DetailedErrorReporter.java
index 8b8c8e37..d886f376 100644
--- a/src/main/java/com/comphenix/protocol/error/DetailedErrorReporter.java
+++ b/src/main/java/com/comphenix/protocol/error/DetailedErrorReporter.java
@@ -30,6 +30,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
+import com.comphenix.protocol.ProtocolConfig;
+import com.comphenix.protocol.ProtocolLibrary;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.bukkit.Bukkit;
@@ -89,7 +91,7 @@ public class DetailedErrorReporter implements ErrorReporter {
// Reports to ignore
private ExpireHashMap