XPTax
2.0.0Additional cost for enchanting and repairing items, with XP Levels or money! Useful for RPG servers!
What does this plugin do?
It removes a defined quantity of XP level (or money) every time a player uses an enchantment table or an anvil.
Why?
If you are like me and think that Minecraft doesn't "charge" enough for enchanting, this plugin is for you.
Config
#Message sent when player does not have the permission
permission_message: "§c[XPTax] You do not have permission to do this!"
#How the tax should be rounded? Options: lower, normal, higher
#Examples:
#Lower: 190.6 ---> 190 or 190.4 ---> 190
#Normal: 190.6 ---> 191 or 190.4 ---> 190
#Higher: 190.6 ---> 191 or 190.4 ---> 191
tax-rounding: normal
#Configuration relative to using an enchantment table
enchantment_table:
#Is this kind of tax enabled?
enabled: true
#Should players in creative mode bypass the tax?
creative-tax-bypass: true
#Should players in creative mode bypass the Minecraft XP cost?
creative-cost-bypass: false
#Should the tax be charged using Vault?
money: false
#Should the tax be based (%) on the enchantment cost?
percentage: false
#If true, the tax will not be based on the item cost, but on the level required to unlock the enchantment
#This works only when percentage is true
calculate-tax-by-unlock-level: false
#If percentage is true, 100.0 = 100%. So if player is enchanting an item that costs 5 levels and this is set as 50.0, the removed amount would be 2.5
#If false, the amount defined here would be taken no matter the enchanting cost
tax: 7.0
#If random tax is enabled, the value above will be ignore and a number between "min-tax" and "max-tax" will be the tax. This works with percentage as well, so be creative ;)
#P.S.: This does not accept decimal values
random-tax:
enabled: false
min-tax: 7
max-tax: 49
#Mark as true to send the messages below to the player
notify_player: true
messages:
xp_removed: "§c[XPTax] %tax% XP levels have been taken from you... Sorry."
money_removed: "§c[XPTax] %tax% coins have been taken from you... Sorry."
not_enough_xp: "§c[XPTax] You do not have enough XP levels to pay the tax (%tax%) and for the item (%price%) (Total cost: %total%). Needed to enchant: %needed%:("
not_enough_money: "§c[XPTax] You do not have enough money to pay the tax (%tax%). Needed: %needed% :("
#Configuration relative to using an anvil (ProtocolLib is necessary)
anvil:
#Is this kind of tax enabled?
enabled: true
#Should players in creative mode bypass the tax?
creative-tax-bypass: true
#Should the tax be charged using Vault?
money: false
#Should the tax be based (%) on the anvil action cost?
percentage: false
#If percentage is true, 100.0 = 100%. So if player is repairing an item that costs 5 levels and this is set as 50.0, the removed amount would be 2.5
#If false, the amount defined here would be taken no matter the repair/action cost
tax: 7.0
#If random tax is enabled, the value above will be ignore and a number between "min-tax" and "max-tax" will be the tax. This works with percentage as well, so be creative ;)
random-tax:
enabled: false
min-tax: 7
max-tax: 49
#Mark as true to send the messages below to the player
notify_player: true
messages:
xp_removed: "§c[XPTax] %tax% XP levels have been taken from you... Sorry."
money_removed: "§c[XPTax] %tax% coins have been taken from you... Sorry."
not_enough_xp: "§c[XPTax] You do not have enough XP levels to pay the tax (%tax%) and for the item (%cost%) (Total: %total%). Needed: %needed% :("
not_enough_money: "§c[XPTax] You do not have enough money to pay the tax (%tax%). Needed: %needed% :("
Permissions
- xptax.bypass - bypass all taxes
- xptax.bypass.anvil - bypass anvil tax
- xptax.bypass.enchantmenttable - bypass enchantment table tax
- xptax.discount.anvil.<1 to 100> - gives this discount in % on anvils
- xptax.discount.enchantmenttable.<1 to 100> - gives this discount in % on enchantment tables
- xptax.admin - allow the use of all commands
- xptax.<commandname>- allow the use of /xptax <commandname>
Commands
- /xptax reload - reloads the plugin configuration
Dependencies
- Vault and Economy plugin (optional)
- ProtocolLib (optional)
To-do
- Commands to change the configuration from the game
- Stats (times and total amount charged)
- Rewrite this mess I call code
It's a very simple plugin. If you have suggestions to improve it, let me know. ;)
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta

