Inactive [ECON] RepairChest v0.9.1 - Spend gold to fix your tools [1.4.6-R0.3]

Discussion in 'Inactive/Unsupported Plugins' started by DemmyDemon, May 1, 2011.

  1. Offline

    DemmyDemon

    RepairChest - Spend gold to fix your tools:
    Version: v0.9.1

    Inspired by one of my most favorite plugins ever, PhysicalShop, this provides a way to spend gold ingots on repairing tools.

    Simply slap a sign over a chest, make the first line "[Repair]", and you're done!
    Users will then put their damaged tools into the chest and right-click the sign while holding their hard earned gold ingots, and the tools in the chest will be repaired.
    Video demonstration by SeaborgiumMC (open)

    Thanks SeaborgiumMC

    Features:
    • Entirely gold-and-sign based. No commands, no economy plugins.
    • As easy to set up as you could hope for.
    • Updated to new Permissions system ("SuperPerm"), but entirely optional.
    • Configurable currency, in case you'd like to keep your valuable Gold Ingots.
    • Configurable prices, but with a sane default.
    • Configurable what is and isn't repairable.
    • Possibility of allowing partial repairs if the player is short on cash.
    • Repair chests are protected against explosions and destructive users.
    • Translatable: Strings built into the configuration.
    Download RepairChest

    Source Code

    Planned improvements
    • None, but feel free to suggest something and I probably won't be extending it any further.
    Permission nodes (open)


    repairchest.create - Place the Magic Sign
    repairchest.use - Use the repair chest, but even checking this permission is off by default.
    repairchest.destroy - Destroy the Magic Sign
    repairchest.testing - Access to /rc test command
    repairchest.reload - Access to /rc reload command

    Commands (open)

    /rc test - Severely damage the held tool
    /rc reload - Reload RepairChest's configuration

    Configuration (open)

    Default values:
    Code:
    verbose: false
    currency: 266
    baseCost: 0.01
    currencyName: g
    currencyString: Gold ingot
    partialRepair: false
    distributePartialRepair: false
    triggerString: "[Repair]"
    checkRepairPermission: false
    repairables: (looong list of integers)
    strings: (list of strings)
    verbose,boolean
    Should the plugin spew loads of irrelevant information to the console?
    Don't turn this on. Seriously. You'll just turn it back off again right away.

    currency,integer
    What item ID does your chosen currency have?
    Default is 266, which is the gold ingot. Perhaps you prefer 341, the Slime ball?
    I suggest you refer to http://www.minecraftdatavalues.com/ to get the ID of your preferred currency if you don't already know it.

    baseCost,double
    What should one point of damage cost to repair?
    The default here is 0.01, meaning you pay 1g for every 100 points of damage.
    Since it's not possible to pay in fractions of an item, it's rounded DOWN to the closest whole, but the price can never be 0.
    This means that even if the baseCost is 0.01 you still have to pay 1g to repair a stone pickax used only once.

    currencyName,string
    What do you refer to your currency as? "I'm rich! I have 200g!"
    It will be used without a preceding space, so set it to " slime balls", including the space, if you want it to say "34 points of damage costs 34 slime balls to repair." rather than "34 points of damage costs 34g to repair."

    currencyString,string
    The long name of your currency, used in the explaining text.
    This should match your currency, so the default is "Gold ingot"

    partialRepair,boolean
    Should it be allowed to only repair some of the items?
    Default here is false, so you can't repair unless you can afford to pay the full sum.

    distributePartialRepair,boolean
    Should partial repairs be distributed?
    If they are distributed, and you pay 1g to repair 5 tools, the 100 "repair credits" will be distributed evenly among them.
    If not, then it will repair the first tool first, then move on if there are "repair credits" left, then the next and the next until your gold is spent.

    checkRepairPermission, boolean
    By default, this is false, meaning that anyone can repair at a repair chest.
    If set to true, it checks the repairchest.use permission before allowing repairs.

    triggerString, string
    The string on signs you want to trigger the repair function with.
    The default is "[Repair]", but it could be "[Reparere]" or "[Fix]" or whatever you want.
    Just keep in mind that changing this will break any existing repair chests out there!

    repairables, list of integers
    Default repairables (open)

    repairables:
    - 256
    - 257
    - 258
    - 259
    - 261
    - 267
    - 268
    - 269
    - 270
    - 271
    - 272
    - 273
    - 274
    - 275
    - 276
    - 277
    - 278
    - 279
    - 283
    - 284
    - 285
    - 286
    - 290
    - 291
    - 292
    - 293
    - 294
    - 298
    - 299
    - 300
    - 301
    - 302
    - 303
    - 304
    - 305
    - 306
    - 307
    - 308
    - 309
    - 310
    - 311
    - 312
    - 313
    - 314
    - 315
    - 316
    - 317
    - 346
    - 359

    Just a looooong list of item IDs of what you want to be repairable.
    The default is all tools, all armors, all weapons, shears and the fishing pole.

    strings, list of strings
    Default strings (open)

    strings:
    spammy: VERBOSE MODE ON! This will get spammy!
    testNoConsole: Sorry, but the console can't have an item in it's hand...
    testNoEmptyHand: You can't test with an empty hand, man.
    testNearlyBroken: Your tool has been nearly broken...
    testNotSuitable: This item isn't suitable for this test.
    reloadedSuccessfully: RepairChest settings reloaded successfully!
    permissionDenied: Permission denied.
    invalidArgument: Invalid argument!
    cantAfford: You can't afford this repair!
    ding: Ding! Repair complete!
    usage: Right-click the sign with a currency item in your hand to pay.
    currencyIs: "The currency is:"
    nothing: Nothing to repair!
    noChest: Uh, there is no chest.
    usagePermissionDenied: Sorry, you don't have permission to use repair chests.
    removePermissionDenied: Permission denied! You can't remove repair chest signs.
    cantRemoveProtected: This block has a protected sign on it, and can't be removed.
    explosionBroadcast: Everyone, please refrain from blowing up repair chests. It's not nice.
    damagePoint: point
    plural: s
    ofDamageCosts: of damage costs
    toRepair: to repair.
    chestAuthorized: Repair chest authorized!
    chestDenied: Sorry, you lack permission to create repair chests!
    chestFirst: Chest first!

    This is for translating the plugin. If you don't already know how to do this, I suggest you play with it for a while, but no support will be given on translations!



    Changelog:

    Version 0.9.1, January 2nd 2013
    • Fixed "Could not find chest" issues that came with a breaking Bukkit change.
      The cardinal directions rotated (to match Minecraft), so I had to rotate the chest-finding method accordingly.
    Version 0.9, August 11th 2012
    • Updated for 1.3.1-R1
    • Repair permission checks is now configurable, and defaults to being off
    • What can and can't be repaired is now configurable
    • triggerString is now respected everywhere (...I hope!)
    • Other minor tweaks and fixes here and there.
    Version 0.8
    • Translatability introduced.
    • Updated for 1.1-R6 compatibility.
    • Made more stuff configurable.
    • Simplified language in the plugin a bit to aid in translatability.
    • Made sure "translatability" is a perfectly cromulent word.
    Version 0.7, January 30th 2012
    • Hop to new Bukkit Events system
    • Potential fix for strange bug that sometimes Enchantments go away. Unable to reproduce, so I have no idea if it's even RepairChest's fault, but hey, I have to try.
    Version 0.6.1, December 20th 2011
    • Fixed sign-on-side-of-chest support.
    • Added refusal to accept edible stuff as currency because of some weird Bukkit(?) bug.
    Older changelog (open)

    Version 0.6, December 13th 2011
    • Combined both commands into /rc, which takes an argument.
    • Thrown out old Permissions support, now 100% SuperPerms
    • Adjustment to API changes, fixing for some (Block.getRelative) and warning suppression for others (org.bukkit.util.config.Configuration).
    • Fixed some brokenness in the /rc test command
    Version 0.5, May 21st 2011
    • Testing shows the explosion resistance is dependable as far as I am able to test. Now considered a Real Feature.
    Version 0.4.2, May 14th 2011
    • No longer clobbers configuration changes on /reload
    • Added /rcreload and /rctest commands (/rctest was already there, but undocumented and called /repairchesttest)
    Version 0.4.1, May 10th 2011
    • Fixed the path and name of the configuration file. I hope.
    Version 0.4, May 9th 2011
    • Fixed the configuration directory not being created if needed.
    • Added partial repairs, in two variants "distributed" and "sequential" (See config options)
    Version 0.3, May 4th 2011
    • Fixed issue where currency was always referred to as "gold", and gold was required for transactions even when a different currency was set. (Thanks Bokou)
    Version 0.2, May 1st 2011
    • Configuration support
    • Working chest/sign protection. Still needs work...
    • Much cleaner code overall.
    Version 0.1, May 1st 2011
    • Initial release
     
    wavecom, kahlilnc, columb and 3 others like this.
  2. Offline

    SurceBeats

    So many thanks again for the answer mate, ill try to do it :)

    Yes, have you read the description?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  3. Offline

    DemmyDemon

    What are you talking about?
    This plugin is not supposed to impact enchantments at all, but some evidence seems to suggest that enchantments might disappear some time after repairing, but only for some players.
    I'm starting to think it has nothing to do with this plugin, but I have no idea, really.

    What exactly are you having problems with? Does it always disenchant, or what? Please elaborate on what the problem is or it is impossible for me to fix it!
     
  4. Offline

    DonProtz

    Hi Demmy,
    just wanted to say thanks for the great plugin. Keep up the good work.
     
  5. Offline

    DemmyDemon

    You're very welcome, glad it's useful.
     
  6. Offline

    bunnyboy

    can't repair enchanted items why. wahwahwah nooooooo:'(
     
  7. Offline

    DemmyDemon

    Why can't you repair enchanted items? Do try and make sense, kid.
     
  8. Offline

    bunnyboy

    Sorry it was simply the config properties. They keep resetting them self why is that? is it something I do? Do love your plugin by the way.
     
  9. Offline

    DemmyDemon

    Reverting them? As in, you make changes and then they're overwritten? Do you /scl reload after editing so that it reads your changes?
     
  10. Offline

    bunnyboy

    No I set the currency to gold nuggets instead of gold ingots and ever so often it just resets the properties so the currency goes back to the default which is gold ingot.
     
  11. Offline

    DemmyDemon

    (Sorry I said "scl" earlier, I've been having a lot of support requests for SimpleChestLock)
    Very odd.
    Are you changing it while the server is offline, or are you doing it "live" then /rc reload?

    The more information you give me, the easier it will be for me to track down the problem and fix it.
     
  12. Offline

    Artheous

    how do i get repairchest to allow non opped players to repair?
     
  13. Offline

    DemmyDemon

    Give them the repairchest.use permission.
     
  14. Offline

    Artheous

    k, that makes since, but im not sure how to give them permission. I open the config file and it looks nothing like it shows when i look it up. or is it a bukkit thing?
     
  15. Offline

    DemmyDemon

    Yes, it's a bukkit thing. Please ask about the basics of server administration elsewhere, as this is not the right thread for that.
     
  16. Offline

    shlitz

    I also had a problem where the chest would only accept the default gold bars no matter how many times i changed the item code. I found out the mod used to use 2 separate files for config and settings, but now only uses config. Delete both files in the repairchest plugin folder, and let the server reload. This should create the file you need to then edit using the config setup listed above in the config spoiler.

    By the way, great mod! My brother refuses to play on my server unless this mod is working.
     
  17. Offline

    DemmyDemon

    Yeah, configuration handling is pretty broken at the moment. I'll look into it when I get the time.

    Tell your brother he's right. This is essential! Loosing hard-earned enchantments sucks!
     
  18. Offline

    mokapang

    it doesnt work in R3(and R4 ofcaurse)
    it just keep saying 'Sorry, you don't have permission to use repair chests.' when users try to fix their tools, and yes I already gave them permissions.
    it's works when OP use.
    there's no crash sign on server log.
     
  19. Offline

    DemmyDemon

    Then you gave the wrong permission, or you're using a broken permissions manager.
    Let me guess... PermissionsEx 1.18?
     
  20. Offline

    mokapang

    im using 'Permissions version 3.1.6'
    should i change to Permissionbukkit?

    I chaged to superperm and it works well.
    Thanks for the plugin DemmyDemon.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  21. Offline

    DemmyDemon

    You're very welcome, I hope it serves you well!
     
  22. Offline

    mrcheesete0

    I assume you have plans to keep this up to date with R5? Been using this plugin for months and my players love it. In a re-vamp of my server I started last weekend I am moving this to a donor perk, and I think this is the most enticing part of the donor package (IMHO)
     
  23. Offline

    DemmyDemon

    Oh, you assume that, do you? You take donations and dangle this as an enticement to donate, yet you have not donated so much as a cent to me? Remind me again why I do this whole plugin thing?

    Anyway, this is already moved to the new event system and all, so there should be no problem with R5. If not, then I'll see how high updating it might be on my priority list.
    Feel free to do it yourself. The source is open, and you're welcome to it.
     
  24. Offline

    mrcheesete0

    I have not yet accepted a single cent in donating, and if donating exceeds my server expenses, I do plan to go to a few of my favorite plugin devs to donate yes, although I doubt I will A: get many donations, B: have more than the server cost even if I do get donations. As of right this second I have as of yet not accepted donations, and right this second am NOT accepting donations, although my paypal and buycraft are all set up and ready to, and have isntead fronted $150 of my own money for a year server (which I need to upgrade), as well as $30 to buy a copy of minecraft for my 2nd-in-command's account so he could stop relying on a shared-account I had given him access to, and almost fronted an additional $100 for a private plugin dev, had my $500 cellphone not been stolen.

    And I wasn't assuming just because you're a plugin dev, I was assuming because unlike some plugin devs, you have been active in keeping up with the thread ,so it seemed to me you still enjoyed working on this plugin, therefore making the plugin update a likely thing.

    And if I new programing I would love to update some of the outdated plugins I wish to use, but unfortunately, everything I know about ANYTHING remotely technical, I have learned in the past 3 months of owning a minecraft server. Before that, the extent of my programing knowledge was HTML. Although maybe in 2-3 years I might take a few classes on java coding while I am on an aircraft carrier and teach myself. Would be handy to know.
     
  25. Offline

    DemmyDemon

    Right, whatever, none of my business.
    No, I've grown a great distaste for plugin development, seeing as a great many people out there can't even read the opening posts, and just yap yap yap about support, and only a single tiiiiny donation has ever come in. It's fairly thankless work, and I do it for the people that appreciate it and at least support it in spirit, if not financially.
    It is offered for free, so you don't owe me anything, but don't make any assumptions about future development. That almost sounds like some sort of demand, and you are not in a position to even hint at demands from me.
    Right. A lot of spare time on aircraft carriers? If so, I think you're doing it wrong.
    Anyway, whatever, none of my business what you do with your time, just as it is none of your business what I do with mine.

    Not even a word of thanks, just a short rambling message on how you plan to make money (or at least offset costs) on my work. Pff, if I could stop just you from using the plugin, I would.

    [edit] I can't spell worth a damn, but I try to clean it up when I see it.
     
  26. Offline

    mrcheesete0

    Just so you know, when you instal this alongside PartyHat, they swap config files.

    EDIT: And then PartyHat doesn't like to work. haven't tested RepairChest yet
     
  27. Offline

    DemmyDemon

    Heh, right, see my reply in the PartyHat thread.

    0.8 is not far off now, just waiting for -R5
     
  28. Offline

    PhantomKitten

    Are you saying that the permissions won't work with PermissionsEx? I have PEX and it won't work; only ops can make and use RepairChests.
     
  29. Offline

    DemmyDemon

    Well, I've had ... less than desirable results with PEX.
    What permissions did you give for it to work? It should work fine, because I'm just using generic permissions lookups, but PEX is surprisingly bad at that.
     
  30. Offline

    PhantomKitten

    I gave my users the repairchest.use node.
     
  31. Offline

    DemmyDemon

    ...and then what happened? What error message do you get? How are you setting up the sign?

    Please be very specific and volunteer as much information as you can come up with.
     

Share This Page