Skip to content

Config.yml

DSH105 edited this page Oct 1, 2013 · 14 revisions

The config.yml is the main Configuration File for the EchoPet plugin, containing many useful features that can be enabled and disabled. If any values are lost from the file, they will automatically regenerate the next time the server restarts or reloads, meaning that if the file is cleared, a default config.yml will generate. Comments will also reappear if lost.

The following table can be used as a guide to configuring the config.yml, generated in the /plugins/EchoPet directory.

Configuration Option Default Function And Explanation
commandString pet The string used when registering the plugin’s main command. If it is set to ec, the main command will be /ec.
autoUpdate false Boolean value that determines whether the plugin automatically downloads new releases without notifying the console.
checkForUpdates true Boolean value. Activates or deactivates the AutoUpdate Checker. Players with the echopet.update permission will be notified of updates if set to true.
sql.overrideFile true If true, Pets saved to a MySQL Database will override those saved to a file (Default and AutoSave Pets)
sql.timeout 30 Time, in minutes before the MySQL Connection is reset
sql.use false Whether or not to utilise MySQL
sql.host localhost Database Host
sql.port 3306 Database Port
sql.database EchoPet Database Name
sql.username none Database Authentication
sql.password none Database Authentication
petSelector.giveOnJoin.enable true Boolean value. True: Players will be given the PetSelector item upon joining the server.
petSelector.giveOnJoin.usePerm false Boolean value. True: Players will be check for the permission set below before being given the Pet Selector item.
petSelector.giveOnJoin.perm echopet.selector.join The permission to be used if petSelector.usePerm is set to true.
petSelector.giveOnJoin.slot 9 The inventory slot that the Pet Selector will be placed in. 8 is the last slot on the hotbar.
petSelector.clearInvOnJoin false Boolean value. True: On joining, each player's inventory will be cleared.
autoSave true Controls activation of the EchoPet AutoSave Function. Useful to prevent data loss in the event of a server crash.
autoSaveTimer 180 The interval at which AutoSave will save all pets to a file.
loadSavedPets true Auto-load pets from last session
multiworldLoadOverride true When true, if loadSavedPets is set to false, Pets will still be loaded when players switch worlds
sendLoadMessage true If autoLoadSavedPets is true, send a message that a Pet was loaded
sendForceMessage true If a data value is forced by configuration (see below), a message will be sent to the player notifying them of forced data.

Pets Section

Each Pet has multiple configurable options specific to each type. There are three values that are common to all Pet Types:

  • Enable (pets.<type>.enable)

    • Able to block specific Pet Types server-side
  • Tag Visible (pets.<type>.tagVisible)

    • Defines if the Pet's name tag is permanently visible or only on roll-over
  • Open DataMenu on Interact (pets.<type>.interactMenu)

    • Defines if the Pet's DataMenu opens when the owner interacts with it
  • Start Follow Distance (pets.<type>.startFollowDistance)

    • Range away from the owner before the Pet starts following
  • Stop Follow Distance (pets.<type>.stopFollowDistance)

    • Range away from the owner before the Pet stops following
  • Teleport Distance (pets.<type>.teleportDistance)

    • Range away from the owner before the Pet teleports
  • Default Pet Name (pets.<type>.defaultName)

    • The name every Pet is given when spawned without one

    • If this value contains (user), the owner's name will be inserted

      • For example, if the owner's name was DSH105:

      The Pet of (user)

      would show as:

      The Pet of DSH105

    • If this value contains (userApos), the owner's name will be inserted, along with an apostrophe

      • For example, if the owner's name was DSH105:

      (userApos) Pet

      would show as:

      DSH105's Pet

  • Attack Damage (pets.<type>.attack.damage)

    • The amount of damage each Pet does when attacking a target.
  • Player Attack (pets.<type>.attack.canAttackPlayers)

    • Defines whether the Pet can attack player targets
  • Attack Lock Range (pets.<type>.attack.lockRange)

    • Distance between a target that a Pet can lock onto
  • Attack Cooldown (pets.<type>.attack.ticksBetweenAttacks)

    • Time (in ticks) between each Pet attack
  • Lose Health (pets.<type>.attack.loseHealth)

    • Defines whether the Pet can take damage
  • Health (pets.<type>.attack.health)

    • The amount of damage each Pet can take before dying.
  • Speed Whilst Ridden (pets.<type>.rideSpeed)

    • The speed at which a Pet travels when ridden by its owner.
  • Jump Height Whilst Ridden (pets.<type>.rideJump)

    • The height a Pet can jump when ridden by its owner
  • Ability To Fly (pets.<type>.canRideFly)

    • Defines if the Pet has the ability to fly when ridden by its owner.

Other Values

  • Any values under pet.<type>.allow, define whether the server allows certain Pet Data types.

    • For example, the following configuration would allow Blaze Pets to have mounts, but not be on fire.
    blaze:
        allow:
            mounts: true
            fire: false
    
  • Any values under pet.<type>.force, define whether the server forces certain Pet Data types.

    • For example, the following configuration would force all Sheep Pets to be Blue and Babies. The Black colour would be optional, but not seen as it would be overridden by the Blue colour
    sheep:
        force:
            blue: true
            baby: true
            black: false
    

Worlds Section

This Configuration Section allows server owners to block and allow Pets in certain worlds. The default world is automatically loaded into the file. Other worlds need to be added manually.

The following example allows Pets in the world and world_nether worlds, but not in world_the_end. Note that there is TWO spaces before the world name (not a tab space).

worlds:
  world: true
  world_nether: true
  world_the_end: false
enableWorldsByDefault: true

The enableWorldsByDefault option will enable/disable Pets for any worlds not mentioned.

Region Blacklist Section

This Configuration section controls the regions in which Pets are disabled and enabled. When the Config.yml is first generated, an example is produced, similar to the setup below.

In the following example, Pets are disabled in the nopets and minigame WorldGuard regions, and enabled by default in all other regions. Areas with no defined region follow the default setting.

worldguard:
  regions:
    nopets: false
    minigame: false
    allowByDefault: true
  regionEnterCheck: true

The worldguard.regionEnterCheck value controls the PlayerMoveListener for Regions. If set to true, Players entering a region in which Pets are disabled will have their Pet automatically removed. This may be disabled for CPU Usage and Performance reasons.

Live Chat

Got something to share? Or just want to talk with the creators of EchoPet? Come join us in IRC - #techcable @ irc.spi.gt

Clone this wiki locally