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) This decides if PacketEvents should collect data anonymously and report to bStats.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
Should we collect server data anonymously and report to bStats?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 due to an packet exception?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
-
getTimeStampMode
Get the timestamp mode- Returns:
- Time Stamp Mode
-
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
This decides 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.
-
customResourceProvider
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
public boolean isbStatsEnabled()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)
-
getResourceProvider
As described above, this method retrieves the function that acquires the InputStream of a desired resource by its path.- Returns:
- Getter for
resourceProvider
-