Interface ViaVersionConfig
- All Superinterfaces:
Config
-
Method Summary
Modifier and TypeMethodDescriptionAPI to check for blocked protocol versions.booleanCaches light until chunks are unloaded to allow subsequent chunk update packets as opposed to instantly uncaching when the first chunk data is sent.booleanTries to cancel block break/place sounds sent by 1.8 servers to 1.9+ clients to prevent them from playing twicebooleanIf enabled, cancel swing packets sent while having an inventory opened on 1.15.2 and below servers.booleanReturns the value of the "enforce secure chat" setting sent to 1.19+ clients on join.booleanFixes 1.21+ clients on 1.20.5 servers placing water/lava buckets at the wrong location when moving fast.intWhen greater than 0, enables tab complete request delaying by x ticksGet the world names that should be returned for each Vanilla dimension.com.google.gson.JsonElementGet the message that is sent when a user displays a resource pack prompt.Get the type of block-connection provider which should be usedGet the custom disconnect messagedoubleGet the vertical offset armor stands are being moved with when the hologram patch is enabledintDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intGet the id for replacing extended pistons.Get the message sent to players being kicked on reload.intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.booleanHandles items with invalid count values (higher than max stack size) on 1.20.3 servers.booleanHides scoreboard numbers for 1.20.3+ clients on older server versions.booleanShould we fix shift quick move action for 1.12 clientsbooleanShould we make team colours based on the last colour in team prefixbooleanbooleanFixes velocity bugs due to different hitbox for 1.14+ clients on sub 1.14 servers.booleanShould 1.15 clients respawn instantly / without showing the death screen.booleanFixes velocity bugs due to different hitbox for 1.9-1.13 clients on 1.8 servers.booleanForce-update 1.19.4+ player's inventory when they try to swap armor in a pre-occupied slot.booleanGet if players will be automatically put in the same team when collision preventing is enabledbooleanGet if the boss bars for 1.9 & 1.10 clients are being stopped from flickering This will keep all boss bars on 100% (not recommended)booleanGet if boss bars are fixed for 1.9 & 1.10 clientsbooleanGet if the plugin should check for updatesbooleanFix 1.9+ clients not rendering the far away chunksbooleanShould we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)booleanForce 1.17+ client to accept the server resource pack.booleanGet if armor stand positions are fixed so holograms show up at the correct height in 1.9 & 1.10booleanIgnores incoming plugin channel messages of 1.16+ clients with channel names longer than 32 charatcers.booleanWhen activated, infested blocks will be mapped to their normal stone variants for 1.13+ clients.booleanUse the item cache to prevent high resource usagebooleanHandles left-handed info by using unused bit 7 on Client Settings packetbooleanGet if 1.9 & 1.10 clients are shown the new effect indicator in the top-right cornerbooleanUse the NMS player tickingbooleanWhether the player can block with the shield without a delay.booleanFixes non full blocks having 0 light for 1.14+ clients on sub 1.14 servers.booleanGet if the 1.11 piston animation patch is enabledbooleanGet if collision preventing for players is enabledbooleanWhen activated, only the most important blocks are saved in the BlockStorage.booleanReplace extended pistons on 1.10 chunk loading.booleanSend supported versions in the status response packetbooleanEnable the serverside blockconnections for 1.13+ clientsbooleanGet if blocking in 1.9 & 1.10 appears as a player holding a shieldbooleanGet if 1.9 & 1.10 clients are shown the new death message on the death screenbooleanPuts the shield into the second hand when holding a sword.booleanStimulate the player tickbooleanWhen activated, the 1-layer snow will be sent as 2-layer snow to 1.13+ clients to have collision.booleanWhen activated with serverside-blockconnections, flower parts with blocks above will be sent as stems.booleanShould we hide errors that occur when trying to convert block and item data over versions?booleanGet if entity data errors will be suppressedbooleanShould we hide errors that occur when trying to convert text components?booleanWhen activated, edited books with more than 50 pages will be shortened to 50.booleanVines not connected to any blocks will be mapped to air for 1.13+ clients to prevent them from climbing up.booleanvoidsetCheckForUpdates(boolean checkForUpdates) Sets whether to check for updates.booleanbooleanIf disabled, tamed cats will be displayed as ocelots to 1.14+ clients on 1.13 servers.
-
Method Details
-
isCheckForUpdates
boolean isCheckForUpdates()Get if the plugin should check for updates- Returns:
- true if update checking is enabled
-
setCheckForUpdates
void setCheckForUpdates(boolean checkForUpdates) Sets whether to check for updates. This updates the internally cached value as well as the config, but does not save the config to disk.- Parameters:
checkForUpdates- true to check for updates on server start and joins
-
isPreventCollision
boolean isPreventCollision()Get if collision preventing for players is enabled- Returns:
- true if collision preventing is enabled
-
isNewEffectIndicator
boolean isNewEffectIndicator()Get if 1.9 & 1.10 clients are shown the new effect indicator in the top-right corner- Returns:
- true if the using of the new effect indicator is enabled
-
isShowNewDeathMessages
boolean isShowNewDeathMessages()Get if 1.9 & 1.10 clients are shown the new death message on the death screen- Returns:
- true if enabled
-
isSuppressMetadataErrors
boolean isSuppressMetadataErrors()Get if entity data errors will be suppressed- Returns:
- true if entity data errors suppression is enabled
-
isShieldBlocking
boolean isShieldBlocking()Get if blocking in 1.9 & 1.10 appears as a player holding a shield- Returns:
- true if shield blocking is enabled
-
isNoDelayShieldBlocking
boolean isNoDelayShieldBlocking()Whether the player can block with the shield without a delay.This option requires
isShowShieldWhenSwordInHand()to be disabled- Returns:
trueif non-delayed shield blocking is enabled.
-
isShowShieldWhenSwordInHand
boolean isShowShieldWhenSwordInHand()Puts the shield into the second hand when holding a sword. The shield will disappear when switching to another item.This option requires
isShieldBlocking()to be enabled- Returns:
trueif the shield should appear when holding a sword
-
isHologramPatch
boolean isHologramPatch()Get if armor stand positions are fixed so holograms show up at the correct height in 1.9 & 1.10- Returns:
- true if hologram patching is enabled
-
isPistonAnimationPatch
boolean isPistonAnimationPatch()Get if the 1.11 piston animation patch is enabled- Returns:
- true if the piston patch is enabled.
-
isBossbarPatch
boolean isBossbarPatch()Get if boss bars are fixed for 1.9 & 1.10 clients- Returns:
- true if boss bar patching is enabled
-
isBossbarAntiflicker
boolean isBossbarAntiflicker()Get if the boss bars for 1.9 & 1.10 clients are being stopped from flickering This will keep all boss bars on 100% (not recommended)- Returns:
- true if boss bar anti-flickering is enabled
-
getHologramYOffset
double getHologramYOffset()Get the vertical offset armor stands are being moved with when the hologram patch is enabled- Returns:
- the vertical offset holograms will be moved with
-
isAutoTeam
boolean isAutoTeam()Get if players will be automatically put in the same team when collision preventing is enabled- Returns:
- true if automatic teaming is enabled
-
getMaxPPS
Deprecated, for removal: This API element is subject to removal in a future version.Get the maximum number of packets a client can send per second.- Returns:
- The number of packets a client can send per second.
-
getMaxPPSKickMessage
Deprecated, for removal: This API element is subject to removal in a future version.Get the kick message sent if the user hits the max packets per second.- Returns:
- Kick message, with colour codes using '&'
-
getTrackingPeriod
Deprecated, for removal: This API element is subject to removal in a future version.The time in seconds that should be tracked for warnings- Returns:
- Time in seconds that should be tracked for warnings
-
getWarningPPS
Deprecated, for removal: This API element is subject to removal in a future version.The number of packets per second to count as a warning- Returns:
- The number of packets per second to count as a warning.
-
getMaxWarnings
Deprecated, for removal: This API element is subject to removal in a future version.Get the maximum number of warnings the client can have in the interval- Returns:
- The number of packets a client can send per second.
-
getMaxWarningsKickMessage
Deprecated, for removal: This API element is subject to removal in a future version.Get the kick message sent if the user goes over the warnings in the interval- Returns:
- Kick message, with colour codes using '&'
-
getPacketTrackerConfig
RateLimitConfig getPacketTrackerConfig() -
getPacketSizeTrackerConfig
RateLimitConfig getPacketSizeTrackerConfig() -
isSendSupportedVersions
boolean isSendSupportedVersions()Send supported versions in the status response packet- Returns:
- If true, enabled
-
isSimulatePlayerTick
boolean isSimulatePlayerTick()Stimulate the player tick- Returns:
- if true, enabled
-
isItemCache
boolean isItemCache()Use the item cache to prevent high resource usage- Returns:
- if true, enabled
-
isNMSPlayerTicking
boolean isNMSPlayerTicking()Use the NMS player ticking- Returns:
- if true, enabled
-
isReplacePistons
boolean isReplacePistons()Replace extended pistons on 1.10 chunk loading.- Returns:
- true if to replace them
-
getPistonReplacementId
int getPistonReplacementId()Get the id for replacing extended pistons.- Returns:
- The integer id
-
isChunkBorderFix
boolean isChunkBorderFix()Fix 1.9+ clients not rendering the far away chunks- Returns:
- true to fix chunk borders
-
is1_13TeamColourFix
boolean is1_13TeamColourFix()Should we make team colours based on the last colour in team prefix- Returns:
- true if enabled
-
shouldRegisterUserConnectionOnJoin
boolean shouldRegisterUserConnectionOnJoin() -
is1_12QuickMoveActionFix
boolean is1_12QuickMoveActionFix()Should we fix shift quick move action for 1.12 clients- Returns:
- true if enabled
-
blockedProtocolVersions
BlockedProtocolVersions blockedProtocolVersions()API to check for blocked protocol versions.- Returns:
- blocked protocol versions
-
getBlockedDisconnectMsg
String getBlockedDisconnectMsg()Get the custom disconnect message- Returns:
- Disconnect message
-
logBlockedJoins
boolean logBlockedJoins() -
getReloadDisconnectMsg
String getReloadDisconnectMsg()Get the message sent to players being kicked on reload. Players are kicked to stop the server crashing- Returns:
- Disconnect message
-
isSuppressConversionWarnings
boolean isSuppressConversionWarnings()Should we hide errors that occur when trying to convert block and item data over versions?- Returns:
- true if enabled
-
isSuppressTextComponentConversionWarnings
boolean isSuppressTextComponentConversionWarnings()Should we hide errors that occur when trying to convert text components?- Returns:
- true if enabled
-
isDisable1_13AutoComplete
boolean isDisable1_13AutoComplete()Should we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)- Returns:
- true if enabled
-
isServersideBlockConnections
boolean isServersideBlockConnections()Enable the serverside blockconnections for 1.13+ clients- Returns:
- true if enabled
-
getBlockConnectionMethod
String getBlockConnectionMethod()Get the type of block-connection provider which should be used- Returns:
- String world for world-level or packet for packet-level
-
isReduceBlockStorageMemory
boolean isReduceBlockStorageMemory()When activated, only the most important blocks are saved in the BlockStorage.- Returns:
- true if enabled
-
isStemWhenBlockAbove
boolean isStemWhenBlockAbove()When activated with serverside-blockconnections, flower parts with blocks above will be sent as stems. Useful for lobbyservers where users can't build and those stems are used decoratively.- Returns:
- true if enabled
-
isVineClimbFix
boolean isVineClimbFix()Vines not connected to any blocks will be mapped to air for 1.13+ clients to prevent them from climbing up.- Returns:
- true if enabled
-
isSnowCollisionFix
boolean isSnowCollisionFix()When activated, the 1-layer snow will be sent as 2-layer snow to 1.13+ clients to have collision.- Returns:
- true if enabled
-
isInfestedBlocksFix
boolean isInfestedBlocksFix()When activated, infested blocks will be mapped to their normal stone variants for 1.13+ clients.- Returns:
- true if enabled
-
get1_13TabCompleteDelay
int get1_13TabCompleteDelay()When greater than 0, enables tab complete request delaying by x ticks- Returns:
- the delay in ticks
-
isTruncate1_14Books
boolean isTruncate1_14Books()When activated, edited books with more than 50 pages will be shortened to 50.- Returns:
- true if enabled
-
isLeftHandedHandling
boolean isLeftHandedHandling()Handles left-handed info by using unused bit 7 on Client Settings packet- Returns:
- true if enabled
-
is1_9HitboxFix
boolean is1_9HitboxFix()Fixes velocity bugs due to different hitbox for 1.9-1.13 clients on 1.8 servers.- Returns:
- true if enabled
-
is1_14HitboxFix
boolean is1_14HitboxFix()Fixes velocity bugs due to different hitbox for 1.14+ clients on sub 1.14 servers.- Returns:
- true if enabled
-
isNonFullBlockLightFix
boolean isNonFullBlockLightFix()Fixes non full blocks having 0 light for 1.14+ clients on sub 1.14 servers.- Returns:
- true if enabled
-
is1_14HealthNaNFix
boolean is1_14HealthNaNFix() -
is1_15InstantRespawn
boolean is1_15InstantRespawn()Should 1.15 clients respawn instantly / without showing the death screen.- Returns:
- true if enabled
-
isIgnoreLong1_16ChannelNames
boolean isIgnoreLong1_16ChannelNames()Ignores incoming plugin channel messages of 1.16+ clients with channel names longer than 32 charatcers.- Returns:
- true if enabled
-
isForcedUse1_17ResourcePack
boolean isForcedUse1_17ResourcePack()Force 1.17+ client to accept the server resource pack.- Returns:
- true if enabled
-
get1_17ResourcePackPrompt
com.google.gson.JsonElement get1_17ResourcePackPrompt()Get the message that is sent when a user displays a resource pack prompt.- Returns:
- cached serialized component
-
get1_16WorldNamesMap
WorldIdentifiers get1_16WorldNamesMap()Get the world names that should be returned for each Vanilla dimension. Note that this can be overridden per-user by usingUserConnection.put(StorableObject)with a custom instance ofWorldIdentifiersfor the user'sUserConnection.- Returns:
- the global map from vanilla dimensions to world name
-
cache1_17Light
boolean cache1_17Light()Caches light until chunks are unloaded to allow subsequent chunk update packets as opposed to instantly uncaching when the first chunk data is sent.- Returns:
- true if enabled
-
isArmorToggleFix
boolean isArmorToggleFix()Force-update 1.19.4+ player's inventory when they try to swap armor in a pre-occupied slot.- Returns:
- true if enabled
-
translateOcelotToCat
boolean translateOcelotToCat()If disabled, tamed cats will be displayed as ocelots to 1.14+ clients on 1.13 servers. Otherwise, ocelots (tamed and untamed) will be displayed as cats.- Returns:
- true if enabled
-
enforceSecureChat
boolean enforceSecureChat()Returns the value of the "enforce secure chat" setting sent to 1.19+ clients on join.- Returns:
- the value sent to 1.19+ clients on join
-
handleInvalidItemCount
boolean handleInvalidItemCount()Handles items with invalid count values (higher than max stack size) on 1.20.3 servers.- Returns:
- true if enabled
-
cancelBlockSounds
boolean cancelBlockSounds()Tries to cancel block break/place sounds sent by 1.8 servers to 1.9+ clients to prevent them from playing twice- Returns:
- true if enabled
-
hideScoreboardNumbers
boolean hideScoreboardNumbers()Hides scoreboard numbers for 1.20.3+ clients on older server versions.- Returns:
- true if enabled
-
fix1_21PlacementRotation
boolean fix1_21PlacementRotation()Fixes 1.21+ clients on 1.20.5 servers placing water/lava buckets at the wrong location when moving fast.- Returns:
- true if enabled
-
cancelSwingInInventory
boolean cancelSwingInInventory()If enabled, cancel swing packets sent while having an inventory opened on 1.15.2 and below servers. This can cause false positives with anti-cheat plugins.- Returns:
- true if enabled
-