Interface ViaVersionConfig

All Superinterfaces:
Config

public interface ViaVersionConfig extends Config
  • 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:
      true if 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:
      true if 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

      int getMaxPPS()
      Get the maximum number of packets a client can send per second.
      Returns:
      The number of packets a client can send per second.
    • getMaxPPSKickMessage

      String getMaxPPSKickMessage()
      Get the kick message sent if the user hits the max packets per second.
      Returns:
      Kick message, with colour codes using '&'
    • getTrackingPeriod

      int getTrackingPeriod()
      The time in seconds that should be tracked for warnings
      Returns:
      Time in seconds that should be tracked for warnings
    • getWarningPPS

      int getWarningPPS()
      The number of packets per second to count as a warning
      Returns:
      The number of packets per second to count as a warning.
    • getMaxWarnings

      int getMaxWarnings()
      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

      String getMaxWarningsKickMessage()
      Get the kick message sent if the user goes over the warnings in the interval
      Returns:
      Kick message, with colour codes using '&'
    • 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_12NBTArrayFix

      boolean is1_12NBTArrayFix()
      Should we fix nbt array's in json chat messages for 1.12 clients
      Returns:
      true if enabled
    • 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
    • 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
    • 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 using UserConnection.put(StorableObject) with a custom instance of WorldIdentifiers for the user's UserConnection.
      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