English documentation

Installation:

  1. Download the plugin file (Insurance.jar)
  2. Place it into your plugins directory
  3. Start your server
  4. Edit plugins/Insurance/config.yml
  5. Run the command insurance-reload (or restart the server)
    (You can repeat steps 3 and 4 as often as necessary to find the right balance with price of your vendors)

Commands:

insurance-calculate: (or icalc)
Calculate the prime for the given player (sender if not specify)

Usage: /insurance-calculate
Description: Calculate how much money you will earn for your current stuff.
Required permission: Insurance.calculateMyPrime

Usage: /insurance-calculate [playername]
Description: Calculate how much money the given player will earn for his current stuff.
Required permission: Insurance.calculatePrime

insurance-reload: (or ireload)
Reload config from disk.

Usage: /insurance-reload
Required permission: Insurance.reload

Permissions:

  • Insurance.*: Gives access to all Insurance commands
  • Insurance.receivePrime: Receive an insurance prime when the player dies.
  • Insurance.calculatePrime: Display the prime's amount of the given player if he dies now.
  • Insurance.calculateMyPrime: Display your prime's amount if you die now.
  • Insurance.reload: Update plugin config from files.

Configuration:

The file plugins/Insurance/config.yml is very simple to understand. Beware: You have to keep the Yaml structure (indentation and ":" symbol as in the default config).

To simplify the writing of this doc page, I will use for example "Insurance.log_prime" to designate "log_prime" option into "Insurance" section.

Insurance.log_prime:
Accept true or false as value, if true, each payment will be log into plugins/Insurance/primesLog.txt. You can delete this file safely when you want.

Insurance.log_filesize :
Maximum number of bytes the config file can be (if Insurance.log_prime is true).

Insurance.calc_message:
Sentence displayed to the user when he calls /insurance-calculate command.
"<player>" will be replaced by the player name and "<amount>" by the sum representing his stuff value.

Insurance.pay_message:
Text message displayed to the user before he receives its money.
"<player>" will be replaced by the player name and "<amount>" by the sum representing his stuff value.

Insurance.pay_command:
Command executed to pay the player (without the "/" which begins command).
Note that this command is performed by the console user (which bypass permissions).
"<player>" will be replaced by the player name and "<amount>" by the sum representing his stuff value.

Example for iConomy plugin:

Insurance:
  log_prime: true
  pay_message: <player>, you will receive soon <amount> dollars for your lost stuff.
  pay_command: money give <player> <amount>
  primes:
    AIR: 0.0
    ...

Insurance.primes:
This is pair values like this: ITEM-NAME: VALUE where ITEM-NAME is the Minecraft internal item name and VALUE the sum given for a single object of this type. So, if you set DIRT:5.0 and COBBLESTONE:10.0, a user who die with 10 dirts and 2 cobbles will receive 70.

Nuance : Some items in Minecraft contains sub-items (wool, wood, …), they will be themselves section which contains their sub-items list with the same notation.

Insurance.consider_condition :
Accept true or false as value, if true, the item condition is taking in consideration to calculate its price.
For example, a sword at middle life will be payed off 50% of the value contained into the config file.

Advanced / Fun:

As Insurance plugin do not depends on any plugin and simply call the command you have want, you can decide to divert from its usage with custom plugin or specific commands… For example have a plugin which expose a command taking the amount and make a random on it. Another idea could be not send money but give food or something else. I let you think about that.

Stupid example:

Insurance:
  log_prime: true
  pay_message: HAHA! you've just loose <amount>$ for equipement… Stuuuuuuuuupid!
  pay_command: give <player> dirt <amount>
  primes:
    ...

Comments

Posts Quoted:
Reply
Clear All Quotes