Class ProtocolConfig

java.lang.Object
com.comphenix.protocol.ProtocolConfig

public class ProtocolConfig extends Object
Represents the configuration of ProtocolLib.
  • Constructor Details

    • ProtocolConfig

      public ProtocolConfig(org.bukkit.plugin.Plugin plugin)
  • Method Details

    • reloadConfig

      public void reloadConfig()
      Reload configuration file.
    • getFile

      public File getFile()
      Retrieve a reference to the configuration file.
      Returns:
      Configuration file on disk.
    • isDetailedErrorReporting

      public boolean isDetailedErrorReporting()
      Determine if detailed error reporting is enabled. Default FALSE.
      Returns:
      TRUE if it is enabled, FALSE otherwise.
    • isChatWarnings

      public boolean isChatWarnings()
      Print warnings to players with protocol.info
      Returns:
      true if enabled, false if not
    • isAutoNotify

      public boolean isAutoNotify()
      Retrieve whether or not ProtocolLib should determine if a new version has been released.
      Returns:
      TRUE if it should do this automatically, FALSE otherwise.
    • isAutoDownload

      public boolean isAutoDownload()
      Retrieve whether or not ProtocolLib should automatically download the new version.
      Returns:
      TRUE if it should, FALSE otherwise.
    • isDebug

      public boolean isDebug()
      Determine whether or not debug mode is enabled.

      This grants access to the filter command.

      Returns:
      TRUE if it is, FALSE otherwise.
    • setDebug

      public void setDebug(boolean value)
      Set whether or not debug mode is enabled.
      Parameters:
      value - - TRUE if it is enabled, FALSE otherwise.
    • getSuppressedReports

      public com.google.common.collect.ImmutableList<String> getSuppressedReports()
      Retrieve an immutable list of every suppressed report type.
      Returns:
      Every suppressed report type.
    • getAutoDelay

      public long getAutoDelay()
      Retrieve the amount of time to wait until checking for a new update.
      Returns:
      The amount of time to wait.
    • getIgnoreVersionCheck

      public String getIgnoreVersionCheck()
      The version of Minecraft to ignore the built-in safety feature.
      Returns:
      The version to ignore ProtocolLib's satefy.
    • isMetricsEnabled

      public boolean isMetricsEnabled()
      Retrieve whether or not metrics is enabled.
      Returns:
      TRUE if metrics is enabled, FALSE otherwise.
    • getAutoLastTime

      public long getAutoLastTime()
      Retrieve the last time we updated, in seconds since 1970.01.01 00:00.
      Returns:
      Last update time.
    • setAutoLastTime

      public void setAutoLastTime(long lastTimeSeconds)
      Set the last time we updated, in seconds since 1970.01.01 00:00.

      Note that this is not considered to modify the configuration, so the modification count will not be incremented.

      Parameters:
      lastTimeSeconds - - new last update time.
    • getScriptEngineName

      public String getScriptEngineName()
      Retrieve the unique name of the script engine to use for filtering.
      Returns:
      Script engine to use.
    • setScriptEngineName

      public void setScriptEngineName(String name)
      Set the unique name of the script engine to use for filtering.

      This setting will take effect next time ProtocolLib is started.

      Parameters:
      name - - name of the script engine to use.
    • getModificationCount

      public int getModificationCount()
      Retrieve the number of modifications made to this configuration.
      Returns:
      The number of modifications.
    • saveAll

      public void saveAll()
      Save the current configuration file.