Configuration

KarmicShare YAML configuration
config.yml

This will explain all the options in the config.yml file.

Note, most of the entries have the same keys for each of them, so I will only go over the specifc keys. The event that its tied into is under the name of the path. For instance:

bed :
    enter : 
        enabled : false

Means that the plugin will not do anything for when a player enters a bed.

Primary Keys:

  • enabled: If true, the plugin will apply its rules for the given event. If false, it will ignore the event entirely. (Default: false)
  • static: If true, it will use the given pay/limit value for all items for that event. If false, it will use the per-item specific config for that event. (Default: true)
  • limit: The daily limit for the given action. This includes the amount of times a player will be paid for that action.
    • A negative value means unlimited.
  • pay: The amount to pay / take from the player. If positive, that player will be paid that amount. If negative, that amount will be taken away.
  • denyOnLackPay: If the player does not have the amount specified for that action, then the action gets denied. (Default: false)
  • denyOnLimit: If the player hits or exceeds the given limit for the action, then the action gets denied. (Default: false)
    • If limit is 0, they will never be paid for the action and will always be denied.
  • world: The worlds that the plugin will listen and act upon for the specific event.

Multiworld: If the "world:" list section is missing or is empty, the plugin will default to all worlds. If a list is given, only the worlds in that list will be applicable for the plugin's logic. Worlds not specified in the list are ignored. World names are not case-sensitive.

Example:

bed:
    enter: 
        worlds:
        - world
        - rpg

The plugin will only listen and act on the bed enter events for the worlds "world" and "rpg" and no others.

Special Keys

  • bow.shoot.minimumforce: The minimum amount of force the entity from the bow needs to be shot at in order to be counted towards the limit. (Default: 0.0)
    • Max is 1.0.
  • bow.shoot.denyOnLowForce: Denies bow shoot action if the force is below the minimum force. (Default: false)

mysql:

  • use: Whether or not to use mysql. If false, it will use SQLite. (Default: false)
  • host: Hostname / IP address of SQL server. (Default: localhost)
  • port: The port to use to connect to the SQL server. (Default: 3306)
  • database: The name of the database to use. (Default: minecraft)
  • user: Username to use to log into SQL server. (Default: username)
  • password: Password to use to log into SQL server. (Default: pass)
  • tablePrefix: The table's prefix, as an identifier for the plugin. No real point in changing it unless you know what you're doing... (Default: kcon_)
  • import: Whether or not to import data from SQLite to MySQL. This will automatically set itself to false after it imports to prevent duplication. (Default: false)

Other:

  • debug.events: Log events to console. Rather spammy. (Default: false)
  • debug.time: Display how long it takes for a command to resolve. (Default: false)
  • debug.economy: Log economy responses. (Default: false)
  • debug.unhandled: Log unhandled cases for events. (Default: false)
  • economy.vault: Pay out to the economy that is hooked to Vault (Default: true)
  • economy.playerpoints: Pay out to PlayerPoints if available (Default: true)
  • listlimit: Amount of item entries to show per page of the list command (Default: 10)
  • version: Current config/database version. Used for auto-updating mechanic, so don't edit this.

values.yml

This explains the per-item values yaml file.

Entries follow standard yaml format.
You do not need to have all the possible key entries for every item. If an item is missing a key path, it will automatically default to the default value for that event from the config.yml. Therefore, you only need to add entries that you want a specific value for.

Valid keys per entry:

  • bypass: custom bypass permission node for the specific item
  • dropPay: the amount to pay when the item is dropped
  • dropLimit: the limit for an item drop
  • dropDenyOnLimit: deny the action when the limit is hit for the item drop
  • dropDenyOnPay: deny the item drop if they cannot pay the amount
  • placePay: the amount to pay when the item is placed
  • placeLimit: the limit for an item placement
  • placeDenyOnLimit: deny place action when limit is hit
  • placeDenyOnPay: deny the placement if they cannot pay the amount
  • pickupPay: the amount to pay when the item is picked up
  • pickupLimit: the limit for an item pickup event
  • pickupDenyOnLimit: deny item pickup action when limit is hit
  • pickupDenyOnPay: deny the item pickup if they cannot pay the amount
  • destroyPay: the amount to pay when the item is destroyed
  • destroyLimit: the limit for an item destroyed
  • destroyDenyOnLimit: deny destroy action when limit is hit
  • destroyDenyOnPay: deny the destroy if they cannot pay the amount
  • craftPay: the amount to pay when the item is crafted
  • craftLimit: the limit for an item craft
  • craftDenyOnLimit: deny craft action when limit is hit
  • craftDenyOnPay: deny the item craft if they cannot pay the amount
  • enchantPay: the amount to pay when the item is enchanted
  • enchantLimit: the limit for an item enchant
  • enchantDenyOnLimit: deny enchant action when limit is hit
  • enchantDenyOnPay: deny the enchant if they cannot pay the amount

A standard item with no data value will have the root path of the item id:

'81':
    placePay : 5

This entry makes it so that a player gets paid 5 for every cactus (81) that is placed. All other values are set to whatever is in the config.yml.

For items with data values, use the "&" as a seperator

'35&15':
    craftPay: 5

This entry makes it so that a player gets paid 5 for every black wool (35:15) is crafted. Once again, all missing keys are assumed to use the defaults.

And here is the auto-generated example values.yml for reference:

'14':
  dropPay: 0.0
  dropDenyOnPay: false
  dropDenyOnLimit: false
  dropLimit: 0
  placePay: 0.0
  placeDenyOnPay: false
  placeDenyOnLimit: false
  placeLimit: 0
  pickupPay: 0.0
  pickupDenyOnPay: false
  pickupDenyOnLimit: false
  pickupLimit: 0
35&7:
  destroyPay: 5.0
  destroyDenyOnPay: false
  destroyDenyOnLimit: false
  destroyLimit: 0
'290':
  craftPay: 0
  craftDenyOnPay: false
  craftDenyOnLimit: false
  craftLimit: 0
  enchantPay: 0.0
  enchantDenyOnPay: false
  enchantDenyOnLimit: false
  enchantLimit: 0

commands.yml

This explains the per-command commands yaml file.

Entries follow standard yaml format.
You do not need to have all the possible key entries for every item. If an item is missing a key path, it will automatically default to the default value for that event from the config.yml. Therefore, you only need to add entries that you want a specific value for.

Valid keys per entry:

  • pay: The amount to give/take for the command
  • limit: The daily limit for the command
  • denyPay: Whether to deny the command usage if they cannot pay the amount.
  • denyLimit: Whether to deny the command usage if they have hit or exceeded their daily limit.
  • bypass: Custom bypass permission node for the specific command.
  • command: The command to listen for and hook into. Not case sensitive. Insert wild cards in order to allow anything for the given place.

Example:

teleport:
  command: /tp *
  pay: -10
  limit: 10
  denyPay: true
  denyLimit: true

The above entry will listen for the /tp command, and will allow anything as the second parameter. Players will need to pay 10 from economy and their daily limit is 10. If they cannot pay the amount or if they have hit their daily limit, then it will deny the command.

Notice, that any commands longer than the given command will count.
For example, if you have your command entry as: /pex user
It will attempt to match what it can. If it matches that much, then it will be considered a match, regardless of what comes afterwards.
So, the following commands would match the above rule:

  • /pex user
  • /pex user Mitsugaru
  • /pex user Mitsugaru group list

The following commands would not match the above rule:

  • /pex
  • /pex group

localization.yml

This config file holds most of the messages that are outputted to the players for certain situations. The default will give the general idea of what goes into the message. Messages will parse color codes correctly. There are certain tags that can be used if the message supports it. The default messages contain all possible tags, so you can add / remove those ones. Adding a tag that the message would not normally handle will result in the tag appearing as is.

  • %tag - The Karmiconomy plugin tag: "[Karmiconomy]"
  • %amount - The amount to be paid
  • %event - The event in question
  • %reason - Reason for denial
  • %extra - any extra information such as: command used, item for the event, permission node, etc.

Comments

Posts Quoted:
Reply
Clear All Quotes