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

    Thallium

    I have a problem, the sign is empty:
    [​IMG]
    (1.0.1-R1)
     
  3. Offline

    DemmyDemon

    Dammit, yeah. Fixed it in 0.6.1
     
  4. Offline

    ZeroZX4

    hey
    can You make possible to translate your plugin ?

    i would want translate it to my language

    any chance ?
     
  5. Offline

    DemmyDemon

    The source is open, so feel free to translate it into whatever language you want.
     
  6. Offline

    ZeroZX4

    since i dont know how to edit open source
    i was hoping u can enable repair chest to put language file in repair chest folder which would look like this

    points of demage=(place where i translate it)
    coast=(place where i translate it)
    repair= (place where i translate it)
    e.t.c.

    any chance ?
     
  7. Offline

    DemmyDemon

    No. That is a lot of work to sink into something I don't need, and I'm winding down my plugin maintenance.
    Besides, editing the source just to translate a few words is not hard. You should look into it. It'll be worth it!
     
  8. Offline

    ZeroZX4

    i got 2 problems S and C look here
    [​IMG]
    i was using program called Dirty JOE which let me edit class files without needing decompile/compile them

    and so S is s letter that appear when i delete POINT > (number# point of demage) than that s appear and lucky for me zniszczenie in my language mean destruction (which make more sens in my language)so like i just change :

    "point" to> zni
    and
    "of damage" to > zczenie
    and that S was generated automatically
    as ressult i get zniszczenie

    so that one works for me but i would want to be able to delete that S but where ?

    2nd is C
    as You can see that C is currency ZLOTE SZTABKI in my language stands for gold ingot
    problem is that i type ZLOTE SZTABKI manually but how do i delete that gold ingot ?

    it would be easier if u let ppl set in config file name of currency not only the shortcut of it which default is g
    this way i could make tutorial how to translate ur plugin for other ppls so u wont need to bother with it

    and 1 more
    how do i change color of fonts ?

    in here
    https://github.com/DemmyDemon/Repai...it/repairchest/RepairChestPlayerListener.java

    i found out that before some lines like for example "nothing to repair" You placed DARK_RED
    but in dirty joe i just find this

    [​IMG]

    which line is for 'nothing to repair' and which is for "right-click sign with ......" ?

    would be allot easier if u add translatable text in config file just like other plugins

    but since u not willing to help me so i can make tutorial on how to translate Your plugin cause i believe ur repairchest is best repair plugin out there cause its not a commad and setting up a currency for repair force players to do something to get that currency go mining if its gold ingot for example so it add up for fun
     
  9. Offline

    DemmyDemon

    What? You want my help in using some third party Java class modifier?
    You've come to the wrong thread. I have no idea how to change text color in that program, or how to remove an S or whatever the [BEEP] you're trying to do.

    Yes, it would be easier for you if I did all the work, except hammering a handful of sentences in Polish (?), but I DON'T HAVE THE TIME OR INCLINATION TO DO SO, and I am under no obligation to you.
    I can't just wave a wand and all the string constants become configurable, you imbecile! It takes work. Unpaid work that takes time I'd rather spend with my dog, my wife and my friends.

    Chiiziz, this is why I'm no longer publishing my plugins.
     
  10. Offline

    jusworld1

    Can you make that you can write on th second line the price and
    with no gold ingot in the hand the player will pay the price? (for repairing)
     
  11. Offline

    DemmyDemon

    No.
    I want the price to be hard-configured so people can't circumvent it somehow, and I want the currency-item in the hand so I'm sure it's a conscious act on the part of the player.

    Sure, I could just wave a wand over the source code and make it configurable, ZeroZX4-style, but I'm all out of fairy dust.
     
  12. Offline

    ZeroZX4

    i understand like 60 % of what you just wrote
    my english is poor

    but i understand that u dont wnat to waist time on it
    and what i am asking you for is not help me translate your plugin
    i want to make tutorial for "how to translate repair chest to your language"
    so every 1 can do it them selfs and not by asking you for any kind of help like i am now got it ?
    so in short of if i just wanna save u allot of work which u not willing to make
    and give ppl possibility of translating your plugin by them selfs

    and if you cant tell me how to change colors in dirty joe and how to remove that S
    than just tell me name of program in which should edit that text ?
    and ill do the rest and wont bother you again.
     
  13. Offline

    DemmyDemon

    The GitHub repo contains an Eclipse project, so that might be the best way to go about it.

    Now, please take your so-called tutorial and leave me alone. I do not wish to participate. Thanks.
     
  14. Offline

    smirk

    I to don't use permission on my server since very small, is there anyway you would concider this in next update, love the mod! We enjoy using gold for our currency :)
     
  15. Offline

    DemmyDemon

    1. Open up the jar file (WinRAR is great for .jar)
    2. Find plugin.yml in there
    3. Near the bottom, find "repairchest.use:"
    4. Change it from default: op to default: true
    5. Save the file back in the jar file. Make sure you're not just saving it to a temp directory!
    6. Restart your server.
    If that doesn't work, then you did it wrong. Try again, but please don't bug me about it.
     
  16. Offline

    smirk

    worked perfectly thanks
     
  17. Offline

    DemmyDemon

    Glad to hear it! You're very welcome.
     
  18. Offline

    Sputnik_15

    I don't use permissions?

    I was wondering how i can make it so my players can use the repair chest. I never understood permissions.. It's always given me troubles
     
  19. Offline

    DemmyDemon

    The solution to this just a few posts above yours.
     
  20. Offline

    Sputnik_15

    Well thank you! I apologize for not reading ^_^ works like a charm!
     
  21. Offline

    DemmyDemon

    Enjoy!
     
  22. Offline

    davvem

    Sorry for asking, but I need to know. Does this works with enchanted items? Sorry if I'm disturbing you. You don't have to answer, but I would appriciate it.
     
  23. Offline

    DemmyDemon

    It's not supposed to affect it at all, but a couple of my users are seeing strange things happening with disappearing enchantments, while the rest are not. Very odd.
    I suggest you try it and give me feedback, so that if there is a problem, I can fix it.
     
  24. Offline

    The Wizard

    Some players suggest me to use some tool repair plugin.
    I also like gold as currency and this plugin may be perfect.
    I want to know if "Configurable prices" means you can put a different price for enhanced tools.
    It would be nice to cost more gold to repair enhanced tools than normal tools.
    Also different price for different enchantments and levels.
     
  25. Offline

    DemmyDemon

    Nope, sorry, the repair mechanics are way older than the Enchantments feature, and I really don't plan to do any major changes. We'll see.
     
  26. Offline

    surtic

    thansk for updating :) runs smoth.
     
  27. Offline

    DemmyDemon

    Good to hear it, thanks.
     
  28. Offline

    columb

    What about fixing enchatned tools?
     
  29. Offline

    SurceBeats

    Great idea mate, this plugins is exactly what i need in my own server, and is awesome the keep up of the enchantment but... Im running with Permissions 3.1.6 (not Superperms) and only the admin can use the permissions nodes through [*]. When i give permissions to a member / moderator about the use of this plugin says that no have permission... Are you planning supporting Permissions 3.1.6?
    Thanks in advance and sorry for my bad english.

    Cheers
     
  30. Offline

    DemmyDemon

    I can't fix it until I find the problem, and I can't find the problem.
    Doesn't look like there's much I can do about it.

    If you're still running ancient Permissions, then you're simply doing it wrong. I'm not turning back the clock and implementing that stuff again. Sorry.
    If you want to give everyone permission to repair, just edit plugin.yml inside the .jar, and say "default: true" for the permission you want everyone to have.
     
  31. Offline

    columb

    Okay, *repairing enchanted items with this plugin?
     

Share This Page