Remove Vanilla Repair

Discussion in 'Archived: Plugin Requests' started by Fire_Feather, Aug 23, 2013.

?

Would you use this plugin?

  1. Yes, I think repairing should be done on anvils only

    1 vote(s)
    33.3%
  2. No.

    2 vote(s)
    66.7%
  1. Offline

    Fire_Feather

    Category: Mech

    Name: NoRepair

    What I Want: Basically, I don't want players to be able to repair their items by crafting them together in either a crafting bench, or their inventory GUI. Now that the Anvil has been implemented, I think that should be the only means of repairing gear...

    Commands: None

    Perms: None

    When I'd Like It By: Soon. Thanks in advance!!
     
  2. Offline

    Chaositic

    Do you want the GUI for the anvil completely disabled? Because if so, you could cancel the event using Skript.
     
  3. Offline

    Fire_Feather

    Chaositic
    What no? I want to keep the anvil. I'm talking about how you can simply place to broken items in either a Crafting GUI or your Inventory GUI and repair them
     
  4. Offline

    Chaositic

    Since the anvil's only use is repairing items, all I'm asking is if you want the GUI from right clicking the anvil blocked or not.
     
  5. Offline

    Fire_Feather

  6. Offline

    Chaositic

    My bad. I just realized you don't want to block the anvil but you in fact want to make it the only thing able to repair with it. Thing is, I'm still stumped at what you're requesting here. There is no vanilla way to use a bench to repair an item unless you use a plugin. mcMMO gives the ability to repair items using an Iron Block but again, that's a plugin. There must be something I'm missing.
     
  7. Offline

    ikyogre1

    Chaositic
    If you put 2 broken items in a crafting table, they will turn into one healed item. He wants to remove that.
     
  8. Offline

    Chaositic

    Wow I didn't even know that existed. Derp on my part.
     
    timtower and Fire_Feather like this.
  9. Offline

    Fire_Feather

    Chaositic
    Yah I didn't even know about it until players started repairing renamed items and it was resetting the name and lore. Hence why I want to disable it :)
     
  10. Offline

    monkeymanboy

    I don't know how I could detect if it was the repair one and not the normal crafting of something but if disabling it for the lores is what you want I can make it so you can't repair it if it has a lore
     
  11. Offline

    metalhedd

    This is like... the easiest plugin in the world... I'll upload it right now..

    BukkitDev: http://dev.bukkit.org/bukkit-plugins/no-vanilla-repair/
    Temporary Download: https://app.box.com/s/2d6tobs0bdhbt0kc3txh
    Complete source code:
    Code:java
    1.  
    2. package com.norcode.bukkit.novanillarepair;
    3.  
    4. import org.bukkit.event.EventHandler;
    5. import org.bukkit.event.Listener;
    6. import org.bukkit.event.inventory.PrepareItemCraftEvent;
    7. import org.bukkit.plugin.java.JavaPlugin;
    8.  
    9. public class NoVanillaRepair extends JavaPlugin implements Listener {
    10. @Override
    11. public void onEnable() {
    12. this.getServer().getPluginManager().registerEvents(this, this);
    13. }
    14.  
    15. @EventHandler
    16. public void onPlayerCraft(PrepareItemCraftEvent event) {
    17. if (event.isRepair()) {
    18. event.getInventory().setResult(null);
    19. }
    20. }
    21. }
    22.  


    Don't forget, the bukkitdev page has a nice little 'Donate' button in the upper right corner, just incase you found this reply to be immensely helpful, and insanely quick. ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  12. Offline

    Fire_Feather

    metalhedd Thanks mate! Much appreciated!
     

Share This Page