Sueta

Repair It: Configurable; Lightweight; Simple.

1.0

Let your players pay to repair items, with a reduced price permission for rank perk!

·Plugin


Repair It lets your players fix their tools and other items, paying money per damage point repaired.

Features

  • Repair player's held item
  • /repairall to repair all items in player's inventory
  • Economy support with configurable per-damage point price
  • Give ranked players a reduced price on repairs with the RepairIt.reduced permission or make it free with RepairIt.free
  • Every message your players will see is configurable
  • Optional confirmation for large repairs
  • Use it as a simple permission-based repair system by toggling off economy in the config! (or just not having Vault installed)

Screenshots

See More



Commands
/repairit rl Reload the config.
/repair Repair the item in your hand fully.
/repair (damage) Repair the specified damage from your held item.
/repairall Repair all items in your inventory.

Permissions
RepairIt.admin gives access to /repairit rl.
RepairIt.repair gives access to /repair
RepairIt.repairall gives access to /repairall
RepairIt.reduced reduces player's repair costs (defined in console)
RepairIt.free makes player's repairs free

Default Config

config.yml
#  
 # RepairIt by Trophonix  
 # - - - - - - - - -  
 # PERMISSIONS  
 # - - - - - - - - -  
 #  RepairIt.admin: Gives access to /repairit reload  
 #  RepairIt.repair: Gives access to /repair (amount)  
 #  RepairIt.repairAll: Gives access to /repairall or /repair all  
 #  RepairIt.reduced: Gives the player a reduced price  
 #  RepairIt.free: Gives the player free repairs  
 # - - - - - - - - -  
 # CONFIG REFERENCE  
 # - - - - - - - - -  
 # Placeholders:  
 #  {input}: Text they inputted for damage amount before trimming and cleanup  
 #  {damage}: Amount of damage being repaired  
 #  {balance}: Player's balance  
 #  {item}: Shows display name or item type if item has no display name  
 #  {itemType}: Shows the item type explicitly  
 #  {price}: Price it will cost  
 #  {originalPrice}: Price before reduction  
 #  {items}: Amount of items repaired (for /repairall)  
 # - - - - - - - - -  
 # pricePerDamagePoint: Price to charge per damage point repaired.  
 # reductionFactor: Price will be multiplied by this for players with RepairIt.reduced permission  
 # roundPrice: true/false; Whether to round the price to closest whole number  
 #  
 # confirmLargeRepair:  
 #   enabled: Whether to confirm a large repair  
 #   minimum: The minimum amount to confirm  
 #   message: Confirmation message  
 #   messageAll: Confirmation for /RepairAll  
 #  
 # failureAlreadyRepaired: Message to send when player attempts  
 #                         repairing a fully repaired item.  
 # failureInsufficientFunds: Message to send if player's balance  
 #                           is too low for the repair.  
 # failureNoRepairableItems: Message to send if player uses /repairall  
 #                           and has no repairable items.  
 #  
 # repairSuccess: Message to send when repair was successful.  
 # repairAllSuccess: Message to send when RepairAll was successful.  
 #  
 # free: Comes after "success" for players with RepairIt.free  
 # reduced: Comes after "success" for players with RepairIt.reduced  
 # full: Comes after "success" for all other players  
 # - - - - - - - - -  
 
economyEnabled   :  true 
 
pricePerDamagePoint   :  2  
reductionFactor   :  0.7 
 
roundPrice   :  true 
 
invalidItem   :   "&c{itemType} items can't be repaired!"   
invalidNumber   :   "&cNot a real number: {input}"  
 
confirmLargeRepair  :  
  enabled   :  true  
  minimum   :  100  
  message   : 
    -  "&bRepairing {damage} damage from your {item} &bfor ${price}."  
    -  "&bType &a/repair &bagain to confirm!"   
  allMessage   : 
    -  "&bRepairing {damage} damage from your {items} items for ${price}."  
    -  "&bType &a/repairall &bagain to confirm!"  
 
failureAlreadyRepaired   :   "&eThat item is already fully repaired!"  
 
failureInsufficientFunds   : 
  -  "&eRepairing {damage} damage will cost ${price}!"  
  -  "&eYour balance is ${balance}."  
 
failureNoRepairableItems   :   "&cYou don't have any damaged items!"  
 
repairSuccess   :   "&aRepaired {damage} damage from your {item}&a!"   
repairAllSuccess   :   "&aRepaired {damage} damage from {items} items!"  
 
free   :   "&bYour rank reduced the repair price! (${originalPrice} -> &a&lFREE&b)"   
reduced   :   "&bYour rank reduced the repair price! (${originalPrice} -> &a${price}&b)"   
full   :   "&bWithdrew &3${price} &bfrom your balance."

Contact Me
Spigot PMs: Click Here
E-Mail: [email protected]
Discord: Lucas#5300

You can also join the Prodigy Support server and post in my support channel!

Check out my premium plugin Trade+

Icon src: https://game-icons.net/1x1/delapouite/blacksmith.html ( License )

Similar projects

Plugin →