Simple /repair command

Discussion in 'Plugin Requests' started by OmegaTronz, Jan 9, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    OmegaTronz

    Hey, please read through this post entirely before saying that this command has already been made. I understand that Essentials has a /repair command, but it's limited.

    Plugin category: AdminTools

    Suggested name: Repair

    What I want: I'd like a plugin that can repair items in your hand instantly, by simply using /repair. Here's the catch: this command must work with any item, and keep any enchantments. The Essentials /repair only works with vanilla items, however I am running a modded server, and it doesn't fix armor/tools from that mod.

    The way item ID's are organized, is that let's say a completely new Diamond Pickaxe is used a bit and it's lost 10 durability, it would go from "278" to "278:10". This same thing applies to the tools and armor in my mod. I need a plugin that will reset any item ID, say "566" from "566:10" to simply "566", keeping any enchantments that the item has.

    Ideas for commands: /repair

    Ideas for permissions: repair.use

    When I'd like it by: As soon as possible.

    The exact mod I'm using on my server is Superheroes Unlimited.
     
  2. Offline

    chickenputty

    Name: RepairAll
    Command: /repair
    Permission: repairall.use (Defaults to server operators)
    Download: http://puttyland.com/share/NnzlpVjH.jar

    This just takes the item in their hand and sets the durability to 0. The negatives to this is that if you run /repair on dye, colored glass, colored clay, etc it will give them the first variation (durability 0).

    Tell me how this works, I can assist further with customizing it for the mod if needed.
     
    Last edited: Jan 11, 2016
  3. Offline

    Irantwomiles

    I don't think you can do anything about the mod
     
  4. Offline

    OmegaTronz

    This works great, thanks so much!!
    Only issue I'm running into is that when I do /repair, I also get the message "An internal error has occured while attempting to perform this command" even though the item repairs fine.
    It's not a huge issue, but any idea why?
     
  5. Offline

    chickenputty

    Can you send me the error?
     
  6. Offline

    OmegaTronz

  7. Offline

    timtower Ninja on the waves Moderator

    Please don't build on the Spigot.jar, use Bukkit.jar instead or make sure to import the Bukkit chatcolor.
     
  8. Offline

    chickenputty

Thread Status:
Not open for further replies.

Share This Page