Class PacketEventsSettings
java.lang.Object
com.github.retrooper.packetevents.settings.PacketEventsSettings
Packet Events' settings.
- Since:
- 1.5.8
-
Constructor Summary
Constructors -
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 modebooleanDeprecated.This method has been deprecated, because the setter has been removed.booleanShould packetevents send debug Messages to the console?booleanShould packetevents send packet exception Stacktraces to the console?booleanShould packetevents kick the player on join if PacketEvents is terminated?booleanShould packetevents kick the player due to an packet exception?booleanShould PacketEvents force the client version translation?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.preViaInjection(boolean preViaInjection) This decides if PacketEvents should force the client version translation.booleanShould the packet listeners be read only?reEncodeByDefault(boolean reEncodeByDefault) Do we re-encode all packets by default?booleanShould we check for updates?booleanShould 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.
-
preViaInjection
This decides if PacketEvents should force the client version translation.- Parameters:
preViaInjection- 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
-
isPreViaInjection
public boolean isPreViaInjection()Should PacketEvents force the client version translation?- Returns:
- Getter for
preViaInjection
-
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
-