Monetary Death Penalty Plugin 1.7.2

Updated: May 27, 2015 | 243 views |

http://img.niceminecraft.net/BukkitPlugin/Monetary%20Death%20Penalty.png

Fear death as MonetaryDeathPenalty will remove currency from a player’s account when they die. This is a great way to help balance a server’s economy.

Description

This is the MonetaryDeathPenalty plugin you can add to your server to monetary penalise players that die. It is currently v2.01 and was designed for v1.7.2 and v1.6.4. It requires Vault. MonetaryDeathPenalty also supports most permissions and most currency plugins. You can add regions to the worldguardBlacklist in the config.yml to disable any money loss within those regions.

I will continue to support this and add many more features. If you have any suggestions please let me know in the comments or through a pm.

Installation and configuration

Place the MonetaryDeathPenalty.jar into your plugins directory and then run the server.

Commands

  • /mdp ? Current version of MonetaryDeathPenalty running.
  • /mdp reload ? Reloads the config for MonetaryDeathPenalty.
  • /mdp set prefix <string> ? Set the prefix for MonetaryDeathPenalty.
  • /mdp set pvppay <integer> ? Set the pvppay for MonetaryDeathPenalty.
  • /mdp set usepercentage <boolean> ? Set the usepercentage for MonetaryDeathPenalty.
  • /mdp set flatpercentage <integer> ? Set the flatpercentage MonetaryDeathPenalty.
  • /mdp set flatamount <integer> ? Set the flatamount MonetaryDeathPenalty.
  • /mdp set vipflatpercentage <integer> ? Set the vipflatpercentage MonetaryDeathPenalty.
  • /mdp set vipflatamount <integer> ? Set the vipflatamount MonetaryDeathPenalty.
  • /mdp set minamountforpenalty <integer> ? Set the minamountforpenalty MonetaryDeathPenalty.
  • /mdp set flatamountbelowminamount <integer> ? Set the flatamountbelowminamount MonetaryDeathPenalty.
  • /mdp set maxpercentagecap <integer> ? Set the maxpercentagecap MonetaryDeathPenalty.
  • /mdp set currencysymbol <symbolr> ? Set the currencysymbol MonetaryDeathPenalty.

Config

Information

Default config for MonetaryDeathPenalty.

prefix ? Display a prefix before the MonetaryDeathPenalty message. To disable type prefix: 0

pvpCost ? Enable or disable players losing money when they are killed by another player.

pvpPay ? Allow players who kill another player to earn a flat amount of currency (pvpCost must be set to true). To disable type pvpPay: 0

usePercentage ? deduct a specified percentage of the players money upon death.

flatPercentage ? will deduct the specified percentage of the total players money upon death.

flatAmount ? deduct a set value rather than a percentage of the players money. Set usePercentage to false if you wish to use this.

vipFlatPercentage ? will deduct the specified percentage of the total players money upon death.

vipFlatAmount ? deduct a set value rather than a percentage of the players money. Set usePercentage to false if you wish to use this.

minAmountForPenalty ? If a player has less than or equal to this amount no currency will be deducted when they die.

flatAmountBelowMinAmount ? If a player has less than or equal to minAmountForPenalty then the value from flatAmountBelowMinAmount will be educted from a player when they die. To disable type flatAmountBelowMinAmount: 0

maxPercentageCap ? Will cap the max amount of currency that can be removed from the usePercentage.

currencySymbol ? Will output currencySymbolX in the money lost message upon death.

worlds: ? MonetaryDeathPenalty will only affect players in the worlds listed.

worldGuardBlackList: ? MonetaryDeathPenalty will have no affect on the players within the specified regions.

Supported variables in the custom message;

{0} ? gets X: 0 Z: 0 Y: 0
{1} ? gets currencySymbol from config
{2} ? gets amount lost for dying
{3} ? gets name of player killed
{4} ? gets amount earned for killing a player

Example 1 ? You have been killed. You died at {0} and have lost {1}.
Output 1 ? You have been killed. You died at X: 123 Z: 322 Y: 65 and have lost 500 Dollars.
Example 2 ? You have been killed. You died at {0} and have lost {2}.
Output 2 ? You have been killed. You died at X: 123 Z: 322 Y: 65 and have lost $500.
Example 3 ? You have earned {4} for killing {3}.
Output 3 ? You have earned 150 for killing Player1.
Example 4 ? You have been awarded {5} for the slaying of {3}.
Output 4 ? You have been awarded $150 for the slaying of Player1.
Supports all minecraft colours &0,&1,&2,&3 etc


 Config.yml

prefix: ‘&a[MDP] ‘
pvpCost: true
pvpPay: 150
usePercentage: true
flatPercentage: 10
flatAmount: 500
vipFlatPercentage: 5
vipFlatAmount: 250
minAmountForPenalty: 1000
flatAmountBelowMinAmount: 100
maxPercentageCap: 5000
currencySymbol: $
customMessage: ‘&6You have died at {0} &6and due to dying you have lost &a{1}&9{2}&6.’
customMessageForKiller: ‘&6You have earned &a{1}&9{4} &6for killing &d{3}&6.’
worlds:
? world
? world_nether
worldGuardBlackList:
? Spawn
? pvpArena

  • checkForUpdates ? MonetaryDeathPenalty will check for updates. Set to false to disable this./
  • prefix ? Display a prefix before the MonetaryDeathPenalty message. To disable type prefix: “
  • pvpPay: 150 ? Allow players who kill another player to earn a flat amount of currency (pvpCost must be set to true). To disable type pvpPay: 0.
  • usePercentage: true ? If true will use the flatPercentage to calculate the amount that is lost upon death.
  • flatPercentage: 10 ? Will remove this percentage of the players current money upon death.
  • flatAmount: 500 ? Will remove this amount of money from the player upon death. Set usePercentage to false if you wish to use this.
  • vipFlatPercentage: 5 ? Will remove the specified percentage of the total players money upon death.
  • vipFlatAmount: 250 ? Will remove a set value rather than a percentage of the players money. Set usePercentage to false if you wish to use this.
  • minAmountForPenalty: 1000 ? If a player has less than or equal to this amount no currency will be deducted when they die.
  • flatAmountBelowMinAmount: 100 ? If a player has less than or equal to minAmountForPenalty then the value from flatAmountBelowMinAmount will be deducted from a player when they die. To disable type flatAmountBelowMinAmount: 0
  • maxPercentageCap: 5000 ? Will cap the max amount of currency that can be removed from the usePercentage.
  • currencySymbol: $ ? Will output currencySymbolX in the money lost message upon death.
  • customMessage: ‘&6You have died at {0} &6and due to dying you have lost &a{1}&9{2}&6.’ ? Will show a custom death message upon death. 
  • customMessageForKiller: ‘&6You have earned &a{1}&9{4} &6for killing &d{3}&6.’ ? Will show a custom message when the player kills another player. 
  • worlds: ? world ? world_nether ? Worlds listed here will prevent players losing money through MonetaryDeathPenalty.
  • worldGuardBlackList: ? region_name_here ? Regions listed here will cause MonetaryDeathPenalty to have no affect on the players currency.

Permissions

  • mdp.ignore
    description: Player cannot be penalised by MonetaryDeathPenalty upon death. Give Ops ? -mdp.ignore permission node to allow MonetaryDeathPenalty to affect their cash. They will still need the ? -mdp.vip permission node if you want Ops to be fully affected by MonetaryDeathPenalty.
  • mdp.vip
    description: Player/group is marked as Vip and penalised using the value from vipFlatPercentage or vipFlatAmount. Give Ops ? -mdp.vip permission node to allow MonetaryDeathPenalty to fully affect their cash.
  • mdp.admin
    description: Player/group is granted admin permissions
    default: op
  • mdp.reload
    description: Reload the config for MonetaryDeathPenalty.
    default: op

Changelog

  • v1.7 ? Build 241013
    Major bug fix.
  • v1.65 ? Build 171013
    New feature (blacklist WorldGuard regions where money can’t be lost).
    Fixed a bug with the reload command and the current version command.
  • v1.54 ? Build 081013
    More in-game commands added to modify config.
    More message formatting options added.
    Updated to Bukkit 1.6.4.
  • v1.45 ? Build 170913
    Major bug fix.
  • v1.4 ? Build 170913
    Minor bug fix.
    New feature (Server owner can configure which worlds MonetaryDeathPenalty will affect).
  • v1.3 ? Build 150913
    Huge code cleanup.
    Changed prefix: false to prefix: 0 to disable the prefix.
    Changed customMessage and customMessageForKiller variables (allow more colour changes within the message (currencySymbol etc.)).
    Removed hard coded colour for currencySymbol (included colour code in customMessage or customMessageForKiller).
    Removed useCurrencySymbol as it was unnecessary.
    Bug fix causing pvpCost to inconsistently detect whether a player caused their death.
    New feature (Now allows a player to earn currency when killing another player (pvpCost must be true)). Set pvpPay to 0 to disable.
    New feature (A custom message when a player kills another player. Check config for supported variables.(pvpCost must be true)).
    New feature (Minimum amount of currency a player has to have before they no can longer be affected by the percentage or flat amount in the config.).
    New feature (Set a flat amount that will be deducted from a players account when they die and have less than or equal to the minimum amount for penalty).
  • v0.9 ? Build 110913
    New feature (Show a prefix before the MonetaryDeathPenalty message).
    Fixed a bug with useCurrencySymbol.
  • v0.8 ? Build 070913
    New feature (customMessage now supports all minecraft colours &1, &2, &3 etc).
    Fixed a bug with useCurrencySymbol.
  • v0.7 ? Build 050913
    New feature (Percentage can now be capped at a max amount).
  • v0.65 ? Build 310813
    Major bug fix.
  • v0.61 ? Build 300813
    New feature (disable cost of dying when killed by another player).
    Minor bug fix.
    Further optimisations to the code.
  • v0.5 ? Build 270813
    New feature, custom message support (read required variables, examples also shown in the config).
    Optimised some code.
    Fixed a conflict with some economy plugins outputting null after the currency name.
    Removed useCurrencySymbol as it was causing some conflicts with some economy plugins.
    Removed deathLocationInChat as it is included in the custom message with the {0} variable.
  • v0.41 ? Build 200813
    Minor bug fix
  • v0.4 ? Build 180813
    New feature (Seperate vip amount for Vip/donators) and reduced length of permission nodes (monetarydeathpenalty. to mdp.)
  • v0.35 ? Build 280613
    New feature (death location in chat message)
  • v0.3 ? Build 270613
    2 new features (currency symbol and currency name in death messages)
  • v0.2 ? Build 260613
    New feature (flat amount removed upon death)
  • v0.15 ? Build 230613
    Minor bug fix
  • v0.1 ? Build 230613
    Initial release

Metrics

As of v2.0 this plugin sends statistics about the usage to the server http://mcstats.org/. You can disable it by setting “opt-out” to true in pluginsPluginMetricsconfig.yml.

http://img.niceminecraft.net/BukkitPlugin/Monetary%20Death%20Penalty%201.png

Auto-checking for updates

As of v2.0 this plugin will check for updates using Curse’s ServerMods API. It always checks the current version with the version on BukkitDev and will notify ops or any players/groups with the mdp.admin permission that there is an update available. It will never automatically download an update without the user typing /mdp update. All of the updates are downloaded from BukkitDev. These checks can be disabled in the config.yml by setting checkForUpdates to false.

Donate

As people have requested a donation button to help support the development of MonetaryDeathPenalty I’ve decided to add one. Thanks to the current and future donations I really appreciate it.

Monetary Death Penalty Plugin 1.7.2 Download Link

http://www.dl2.9minecraft.net/index.php?act=dl&id=1392707722

http://www.dl5.9minecraft.net/index.php?act=dl&id=1392734019


Credits: Supavitax