Class PacketEventsSettings
java.lang.Object
com.github.retrooper.packetevents.settings.PacketEventsSettings
Packet Events' settings.
- Since:
- 1.5.8
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbStats
(boolean bStatsEnabled) Deprecated.This method has been deprecated.checkForUpdates
(boolean checkForUpdates) This decides if PacketEvents should check for updates and notify when your server starts.customResourceProvider
(Function<String, InputStream> resourceProvider) Some projects may want to implement a CDN with resources like asset mappings By default, all resources are retrieved from the ClassLoaderdebug
(boolean debugEnabled) This decides if PacketEvents should spam debug messagesdownsampleColors
(boolean downsampleColors) This decides if PacketEvents should downsample RGB colors on pre-1.16 servers.fullStackTrace
(boolean fullStackTraceEnabled) This decides if PacketEvents should print packets error stacktraceAs described above, this method retrieves the function that acquires the InputStream of a desired resource by its path.Get the timestamp modeboolean
Deprecated.This method has been deprecated, because the setter has been removed.boolean
Should packetevents send debug Messages to the console?boolean
Should packetevents send packet exception Stacktraces to the console?boolean
Should packetevents kick the player on join if PacketEvents is terminated?boolean
Should packetevents kick the player due to an packet exception?kickIfTerminated
(boolean kickIfTerminated) This decides if PacketEvents should kick the player on join if PacketEvents is terminated.kickOnPacketException
(boolean kickOnPacketExceptionEnabled) This decides if PacketEvents should kick the player in case a packet exception occurs.boolean
Should the packet listeners be read only?reEncodeByDefault
(boolean reEncodeByDefault) Do we re-encode all packets by default?boolean
Should we check for updates?boolean
Should we downsample RGB colors on pre-1.16 servers?timeStampMode
(TimeStampMode timeStampMode) Time stamp mode.
-
Constructor Details
-
PacketEventsSettings
public PacketEventsSettings()
-
-
Method Details
-
timeStampMode
Time stamp mode. How precise should the timestamps in the events be.- Parameters:
timeStampMode
- Time Stamp mode- Returns:
- Settings instance
-
reEncodeByDefault
Do we re-encode all packets by default?- Parameters:
reEncodeByDefault
- Value- Returns:
- Settings instance
-
checkForUpdates
This decides if PacketEvents should check for updates and notify when your server starts.- Parameters:
checkForUpdates
- Value- Returns:
- Settings instance.
-
downsampleColors
This decides if PacketEvents should downsample RGB colors on pre-1.16 servers.- Parameters:
downsampleColors
- Value- Returns:
- Settings instance.
-
bStats
Deprecated.This method has been deprecated. To disable bStats use the config file found in the bStats folder.This used to decide if PacketEvents should collect data anonymously and report to bStats.- Parameters:
bStatsEnabled
- Value- Returns:
- Settings instance.
-
debug
This decides if PacketEvents should spam debug messages- Parameters:
debugEnabled
- Value- Returns:
- Settings instance.
-
fullStackTrace
This decides if PacketEvents should print packets error stacktrace- Parameters:
fullStackTraceEnabled
- Value- Returns:
- Settings instance.
-
kickOnPacketException
This decides if PacketEvents should kick the player in case a packet exception occurs.- Parameters:
kickOnPacketExceptionEnabled
- Value- Returns:
- Settings instance.
-
kickIfTerminated
This decides if PacketEvents should kick the player on join if PacketEvents is terminated.- Parameters:
kickIfTerminated
- Value- Returns:
- Settings instance.
-
customResourceProvider
@Internal public PacketEventsSettings customResourceProvider(Function<String, InputStream> resourceProvider) Some projects may want to implement a CDN with resources like asset mappings By default, all resources are retrieved from the ClassLoader- Parameters:
resourceProvider
- Function- Returns:
- Settings instance.
-
reEncodeByDefault
public boolean reEncodeByDefault()Should the packet listeners be read only?- Returns:
- Getter for
defaultReencode
-
shouldCheckForUpdates
public boolean shouldCheckForUpdates()Should we check for updates?- Returns:
- Getter for
checkForUpdates
-
shouldDownsampleColors
public boolean shouldDownsampleColors()Should we downsample RGB colors on pre-1.16 servers?- Returns:
- Getter for
downsampleColors
-
isbStatsEnabled
Deprecated.This method has been deprecated, because the setter has been removed. Disabling bStats is now done through the bStats config file.Should we collect server data anonymously and report to bStats?- Returns:
- Getter for bStatsEnabled
-
isDebugEnabled
public boolean isDebugEnabled()Should packetevents send debug Messages to the console?- Returns:
- Getter for
debugEnabled
-
isFullStackTraceEnabled
public boolean isFullStackTraceEnabled()Should packetevents send packet exception Stacktraces to the console?- Returns:
- Getter for
fullStackTrace(boolean)
-
isKickOnPacketExceptionEnabled
public boolean isKickOnPacketExceptionEnabled()Should packetevents kick the player due to an packet exception?- Returns:
- Getter for
kickOnPacketException(boolean)
-
isKickIfTerminated
public boolean isKickIfTerminated()Should packetevents kick the player on join if PacketEvents is terminated?- Returns:
- Getter for
kickIfTerminated
-
getResourceProvider
As described above, this method retrieves the function that acquires the InputStream of a desired resource by its path.- Returns:
- Getter for
resourceProvider
-
getTimeStampMode
Get the timestamp mode- Returns:
- Time Stamp Mode
-