Class ViaRewindConfig

java.lang.Object
com.viaversion.viaversion.util.ConfigSection
com.viaversion.viaversion.util.Config
com.viaversion.viarewind.ViaRewindConfig
All Implemented Interfaces:
ViaRewindConfig, com.viaversion.viaversion.api.configuration.Config

public class ViaRewindConfig extends com.viaversion.viaversion.util.Config implements ViaRewindConfig
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.viaversion.viarewind.api.ViaRewindConfig

    ViaRewindConfig.CooldownIndicator
  • Field Summary

    Fields inherited from class com.viaversion.viaversion.util.Config

    logger

    Fields inherited from class com.viaversion.viaversion.util.ConfigSection

    path, root, values
  • Constructor Summary

    Constructors
    Constructor
    Description
    ViaRewindConfig(File configFile, Logger logger)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Always shows the original mob's name instead of only when hovering over them with the cursor.
    boolean
    If enabled, 1.8 players on 1.9+ servers will also experience the levitation effect by sending velocity packets.
    Specifies how 1.8.x clients should see the cooldown indicator You can choose between TITLE, ACTION_BAR, BOSS_BAR and DISABLED ONLY DISABLE IF YOU HAVE 1.9 COOLDOWN DISABLED ON YOUR SERVER 1.8 PLAYERS MAY ASK WHY PVP IS NOT WORKING OTHERWISE
     
     
    int
    Max amount of pages for written books before a client gets kicked
    int
    Max amount of characters in the json (!) string of a book page before a client gets kicked
    Allows to define the offhand command
     
    The particle to show the world border for the 1.8+ world border for 1.7.x clients
    protected void
     
    boolean
    If enabled, 1.8 players will handle the player combat packet added in 1.9 by showing the custom death message above the hotbar.
    boolean
    Whether to emulate the 1.8+ world border for 1.7.x clients
    boolean
    If enabled, 1.8 players on 1.9+ servers can use /offhand to switch items between their main hand and offhand.
    boolean
    Replaces Adventure mode with Survival mode for 1.7.x clients Enable this option if your server is using the 'CanDestroy' or 'CanPlaceOn' flags on items
    boolean
    Whether 1.9 particles should be replaced by similar ones in 1.8 and lower
    void
     

    Methods inherited from class com.viaversion.viaversion.util.Config

    getSectionsWithModifiableKeys, loadConfig, loadConfig, logger, originalRootSection, root, save, save, save

    Methods inherited from class com.viaversion.viaversion.util.ConfigSection

    contains, get, get, getBoolean, getDouble, getInt, getIntegerList, getListSafe, getSection, getSerializedComponent, getString, getStringList, getValues, set

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.viaversion.viaversion.api.configuration.Config

    getValues, save, set
  • Constructor Details

    • ViaRewindConfig

      public ViaRewindConfig(File configFile, Logger logger)
  • Method Details

    • reload

      public void reload()
      Specified by:
      reload in interface com.viaversion.viaversion.api.configuration.Config
      Overrides:
      reload in class com.viaversion.viaversion.util.Config
    • getCooldownIndicator

      public ViaRewindConfig.CooldownIndicator getCooldownIndicator()
      Description copied from interface: ViaRewindConfig
      Specifies how 1.8.x clients should see the cooldown indicator You can choose between TITLE, ACTION_BAR, BOSS_BAR and DISABLED ONLY DISABLE IF YOU HAVE 1.9 COOLDOWN DISABLED ON YOUR SERVER 1.8 PLAYERS MAY ASK WHY PVP IS NOT WORKING OTHERWISE
      Specified by:
      getCooldownIndicator in interface ViaRewindConfig
      Returns:
      the cooldown indicator
    • isReplaceAdventureMode

      public boolean isReplaceAdventureMode()
      Description copied from interface: ViaRewindConfig
      Replaces Adventure mode with Survival mode for 1.7.x clients Enable this option if your server is using the 'CanDestroy' or 'CanPlaceOn' flags on items
      Specified by:
      isReplaceAdventureMode in interface ViaRewindConfig
      Returns:
      true if enabled
    • isReplaceParticles

      public boolean isReplaceParticles()
      Description copied from interface: ViaRewindConfig
      Whether 1.9 particles should be replaced by similar ones in 1.8 and lower
      Specified by:
      isReplaceParticles in interface ViaRewindConfig
      Returns:
      true if enabled
    • getMaxBookPages

      public int getMaxBookPages()
      Description copied from interface: ViaRewindConfig
      Max amount of pages for written books before a client gets kicked
      Specified by:
      getMaxBookPages in interface ViaRewindConfig
      Returns:
      the max amount of pages
    • getMaxBookPageSize

      public int getMaxBookPageSize()
      Description copied from interface: ViaRewindConfig
      Max amount of characters in the json (!) string of a book page before a client gets kicked
      Specified by:
      getMaxBookPageSize in interface ViaRewindConfig
      Returns:
      the max amount of characters
    • isEmulateWorldBorder

      public boolean isEmulateWorldBorder()
      Description copied from interface: ViaRewindConfig
      Whether to emulate the 1.8+ world border for 1.7.x clients
      Specified by:
      isEmulateWorldBorder in interface ViaRewindConfig
      Returns:
      true if enabled
    • alwaysShowOriginalMobName

      public boolean alwaysShowOriginalMobName()
      Description copied from interface: ViaRewindConfig
      Always shows the original mob's name instead of only when hovering over them with the cursor.
      Specified by:
      alwaysShowOriginalMobName in interface ViaRewindConfig
      Returns:
      true if enabled
    • getWorldBorderParticle

      public String getWorldBorderParticle()
      Description copied from interface: ViaRewindConfig
      The particle to show the world border for the 1.8+ world border for 1.7.x clients
      Specified by:
      getWorldBorderParticle in interface ViaRewindConfig
      Returns:
      the particle name
    • isEnableOffhand

      public boolean isEnableOffhand()
      Description copied from interface: ViaRewindConfig
      If enabled, 1.8 players on 1.9+ servers can use /offhand to switch items between their main hand and offhand.
      Specified by:
      isEnableOffhand in interface ViaRewindConfig
      Returns:
      true if enabled
    • getOffhandCommand

      public String getOffhandCommand()
      Description copied from interface: ViaRewindConfig
      Allows to define the offhand command
      Specified by:
      getOffhandCommand in interface ViaRewindConfig
      Returns:
      the offhand command
    • emulateLevitationEffect

      public boolean emulateLevitationEffect()
      Description copied from interface: ViaRewindConfig
      If enabled, 1.8 players on 1.9+ servers will also experience the levitation effect by sending velocity packets.
      Specified by:
      emulateLevitationEffect in interface ViaRewindConfig
      Returns:
      true if enabled
    • handlePlayerCombatPacket

      public boolean handlePlayerCombatPacket()
      Description copied from interface: ViaRewindConfig
      If enabled, 1.8 players will handle the player combat packet added in 1.9 by showing the custom death message above the hotbar.
      Specified by:
      handlePlayerCombatPacket in interface ViaRewindConfig
      Returns:
      true if enabled
    • getDefaultConfigURL

      public URL getDefaultConfigURL()
      Overrides:
      getDefaultConfigURL in class com.viaversion.viaversion.util.Config
    • getDefaultConfigInputStream

      public InputStream getDefaultConfigInputStream()
      Overrides:
      getDefaultConfigInputStream in class com.viaversion.viaversion.util.Config
    • handleConfig

      protected void handleConfig(Map<String,Object> map)
      Overrides:
      handleConfig in class com.viaversion.viaversion.util.Config
    • getUnsupportedOptions

      public List<String> getUnsupportedOptions()
      Overrides:
      getUnsupportedOptions in class com.viaversion.viaversion.util.Config