public class ProtocolConfig
extends java.lang.Object
Constructor and Description |
---|
ProtocolConfig(org.bukkit.plugin.Plugin plugin) |
ProtocolConfig(org.bukkit.plugin.Plugin plugin,
org.bukkit.configuration.Configuration config) |
Modifier and Type | Method and Description |
---|---|
long |
getAutoDelay()
Retrieve the amount of time to wait until checking for a new update.
|
long |
getAutoLastTime()
Retrieve the last time we updated, in seconds since 1970.01.01 00:00.
|
PacketFilterManager.PlayerInjectHooks |
getDefaultMethod()
Retrieve the default injection method.
|
java.io.File |
getFile()
Retrieve a reference to the configuration file.
|
java.lang.String |
getIgnoreVersionCheck()
The version of Minecraft to ignore the built-in safety feature.
|
PacketFilterManager.PlayerInjectHooks |
getInjectionMethod()
Retrieve the injection method that has been set in the configuration, or use a default value.
|
int |
getModificationCount()
Retrieve the number of modifications made to this configuration.
|
java.lang.String |
getScriptEngineName()
Retrieve the unique name of the script engine to use for filtering.
|
com.google.common.collect.ImmutableList<java.lang.String> |
getSuppressedReports()
Retrieve an immutable list of every suppressed report type.
|
boolean |
isAutoDownload()
Retrieve whether or not ProtocolLib should automatically download the new version.
|
boolean |
isAutoNotify()
Retrieve whether or not ProtocolLib should determine if a new version has been released.
|
boolean |
isBackgroundCompilerEnabled()
Retrieve whether or not the background compiler for structure modifiers is enabled or not.
|
boolean |
isDebug()
Determine whether or not debug mode is enabled.
|
boolean |
isDetailedErrorReporting()
Determine if detailed error reporting is enabled.
|
boolean |
isMetricsEnabled()
Retrieve whether or not metrics is enabled.
|
void |
reloadConfig()
Reload configuration file.
|
void |
saveAll()
Save the current configuration file.
|
void |
setAutoDelay(long delaySeconds)
Set the amount of time to wait until checking for a new update.
|
void |
setAutoDownload(boolean value)
Set whether or not ProtocolLib should automatically download the new version.
|
void |
setAutoLastTime(long lastTimeSeconds)
Set the last time we updated, in seconds since 1970.01.01 00:00.
|
void |
setAutoNotify(boolean value)
Set whether or not ProtocolLib should determine if a new version has been released.
|
void |
setBackgroundCompilerEnabled(boolean enabled)
Set whether or not the background compiler for structure modifiers is enabled or not.
|
void |
setDebug(boolean value)
Set whether or not debug mode is enabled.
|
void |
setDetailedErrorReporting(boolean value)
Set whether or not detailed error reporting is enabled.
|
void |
setIgnoreVersionCheck(java.lang.String ignoreVersion)
Sets under which version of Minecraft the version safety feature will be ignored.
|
void |
setInjectionMethod(PacketFilterManager.PlayerInjectHooks hook)
Set the starting injection method to use.
|
void |
setMetricsEnabled(boolean enabled)
Set whether or not metrics is enabled.
|
void |
setScriptEngineName(java.lang.String name)
Set the unique name of the script engine to use for filtering.
|
void |
setSuppressedReports(java.util.List<java.lang.String> reports)
Set the list of suppressed report types,
|
public ProtocolConfig(org.bukkit.plugin.Plugin plugin)
public ProtocolConfig(org.bukkit.plugin.Plugin plugin, org.bukkit.configuration.Configuration config)
public void reloadConfig()
public java.io.File getFile()
public boolean isDetailedErrorReporting()
public void setDetailedErrorReporting(boolean value)
value
- - TRUE if it is enabled, FALSE otherwise.public boolean isAutoNotify()
public void setAutoNotify(boolean value)
value
- - TRUE to do this automatically, FALSE otherwise.public boolean isAutoDownload()
public void setAutoDownload(boolean value)
value
- - TRUE if it should. FALSE otherwise.public boolean isDebug()
This grants access to the filter command.
public void setDebug(boolean value)
value
- - TRUE if it is enabled, FALSE otherwise.public com.google.common.collect.ImmutableList<java.lang.String> getSuppressedReports()
public void setSuppressedReports(java.util.List<java.lang.String> reports)
reports
- - suppressed report types.public long getAutoDelay()
public void setAutoDelay(long delaySeconds)
This time must be greater than 59 seconds.
delaySeconds
- - the amount of time to wait.public java.lang.String getIgnoreVersionCheck()
public void setIgnoreVersionCheck(java.lang.String ignoreVersion)
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.
ignoreVersion
- - the version of Minecraft where the satefy will be disabled.public boolean isMetricsEnabled()
public void setMetricsEnabled(boolean enabled)
This setting will take effect next time ProtocolLib is started.
enabled
- - whether or not metrics is enabled.public boolean isBackgroundCompilerEnabled()
public void setBackgroundCompilerEnabled(boolean enabled)
This setting will take effect next time ProtocolLib is started.
enabled
- - TRUE if is enabled/running, FALSE otherwise.public long getAutoLastTime()
public void setAutoLastTime(long lastTimeSeconds)
Note that this is not considered to modify the configuration, so the modification count will not be incremented.
lastTimeSeconds
- - new last update time.public java.lang.String getScriptEngineName()
public void setScriptEngineName(java.lang.String name)
This setting will take effect next time ProtocolLib is started.
name
- - name of the script engine to use.public PacketFilterManager.PlayerInjectHooks getDefaultMethod()
public PacketFilterManager.PlayerInjectHooks getInjectionMethod() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- If the configuration option is malformed.public void setInjectionMethod(PacketFilterManager.PlayerInjectHooks hook)
public int getModificationCount()
public void saveAll()