Do epic mobs or weapons destroy your armor like that <snap!>? Don't like having to recreate armor all the time? Or wish your super-epic gold weapon wouldn't wear out so quickly? Unbreakable will make it never wear out.
Unbreakable is a simple idea, inspired by @shoter : don't allow armor or weapons to break when hit, especially when it is hit hard. It does so not by the unbreaking enchantment, which only slows down the inevitable, nor by repeatedly repairing your item, which both is a heavy server load and no good if it breaks, but by a new feature hidden in 1.7.2 Minecraft to make some things never break.
By design this plugin is very lightweight. It only fires when an item breaks, and only does that once per item. Or, (since 1.5) you can now configure it to be a little more active and pre-mark items as unbreakable before they are even used. Have had a lot of requests for this feature, so hope you're happy.
The first time your item breaks, it will immediately be given back to you with an Unbreakable tag, which you can see when mousing over the item. All attributes, metadata, and tags are retained.
Alternatively (since in 1.5) you can now avoid items getting "used up" and appearing to break by setting Unbreakable before break config items.
Also supports enchanting books and using them on an anvil.
- Since version 4, requires Spigot (spigotmc.org) for Minecraft 1.9 or later;
- some plugins that manage tool/weapon breaking on their own do not respect the new Unbreakable tag, and so will still damage the item. Suggest submitting a feature request to the plugin author to respect it.
- Only works with version 1.7.2-R0.2 or greater.
4. Unbreakable tag not restored through server stop/save/restarts and right clicking to place one [v.2.0]. Known Bukkit issue.
Copies default config.yml to plugins/Unbreakable/ if none exists. If you want to skip to examples, go to this page here.
Three config items control what is automatically made unbreakable. "Weapons" means only swords and bows. "Tools" means everything else. Names and defaults below:
- Protect armor: true
- Protect weapons: true
- Protect tools: true
Shields are categorized as tools above. [NEW in 4.1]
One more item (in 1.6) allows tagging only certain unique items as unbreakable, by finding a string in its Lore. If you configure this string and that string is found within any item's Lore, that item will become unbreakable without checking user permissions or World-based controls. Example below:
Lore unbreakable string: Unbreakable
If you do not want a message to players when their item becomes unbreakable, make a plugins/Unbreakable/config.yml with the one line:
Message on making unbreakable: false
You can change default to not repair items when making Unbreakable. Preserves the damage value, commonly referred as data value. For consistency with previous versions, default is to do a repair as per below, setting it to zero.
Also repair: true
You can now set whether or not the Unbreakable tag is displayed to players. Just set the Hide Unbreakable flag to false. [New in 4.2]
You can also set custom lore when an item is made unbreakable. You can use this, for example, to make "Unbreakable" appear where enchantments appear. New item is a list of strings called Enchant lore. Caution: this will replace any lore already on the item before making it unbreakable. [New in 4.2]
Enchant lore: - line 1 - §1line 2 in blue - line 3 - line 4
Color codes are allowed in above lore.
Note that you can also customize the lore that is added to an enchanted book with Unbreakable in it using the LanguageAPI. See Languages and Translation page for details.
Unbreakable before break
By default items are only marked Unbreakable once they break since this is the least server load, but it can make your users nervous when their items appear to be wearing out. You can now pre-mark automatically protected items (i.e. one or more Protect armor/weapons/tools/elytra is set) as Unbreakable, based on different events. Select the ones you prefer based on acceptable server load. They are presented roughly in increasing server load. All default to false.
- Unbreakable on pickup: if true, all protected items picked up by a player (who has permission) will become unbreakable.
- Unbreakable on spawn: if true, all protected items spawned on ground (ex. when dropped) will become unbreakable.
- Does not check player permissions, so if this marks an item anybody can pick it up.
- Unbreakable on hold: if true, any protected item moved to hand or worn will become unbreakable.[in 1.6]
- Unbreakable on join: if true, all protected & permitted items in a player's inventory will become unbreakable when he joins server or moves worlds.
- may not work with plugins adding nested inventory items like backpacks.
- Breakable on leave world: if true, removes all Unbreakable tags on items in a player's inventory when she leaves a protected world to an unprotected one.
- only effective if Auto fix worldlist is set; see below
- Caution: can remove legally Unbreakable enchants from items.
Can configure automatic protections and enchanting only for certain worlds. If not set, both default to all worlds. If you use these, may wish to use a world-specific inventory plugin like MultiInv or Entei's Inventory Manager to keep inventories from Unbreakable worlds from moving to other worlds, or v.v..
- Auto fix worldlist: list of worlds in which auto-fixing by event and/or item type is active
- only applies to Protect armor/weapons/tools, that is,
- Lore unbreakable string if set applies to all worlds regardless of this since the item always has such lore
- Enchanting worldlist: list of worlds in which Unbreakable enchanting of items or books is permitted.
Auto fix worldlist: - pvp_world Enchanting worldlist: - survival_world - adventure_world
Config for Enchanting
Four items control enchanting behavior. First controls whether a message is sent to the player enchanting, second applies when using an anvil, and last two control the mechanics of enchanting with a book storing Unbreakable. Latter two are embedded into the book lore. Defaults are below.
Message on enchant: false Message on enchant cancel: true // using Unbreakable books Anvil enchant delay sec: 5 Anvil enchant cost: 3
Has a corresponding permission so that you can give individuals by user/group. Use is optional and all default to . Note that these only apply to automatic triggers from Protect armor/weapons/tools and are NOT checked if Unbreakable on spawn is true or if Lore unbreakable string is set and triggered.
Enchanting is controlled by the following permissions, with shown defaults:
- unbreakable.cmd: Allows enchanting held item with Unbreakable by unbk command
- default: op
- unbreakable.ench: Allows enchanting item with Unbreakable on Enchant table
- default: true
- unbreakable.anvil: Allows enchanting an item with an Unbreakable book on anvil
- default: true
One command: unbk which enchants the held item with Unbreakable.
Multiple Language Support
Supports multiple languages. See Languages and Translation page for details.
- Add a list of items to protect by material name string and durability range.
- Add similar functionality for similar Invulnerable tag, which means it can't be destroyed when dropped, even by lava.
Add Protect elytra [4.7] Add option to unbk command to remove Unbreakable, perhaps "/unbk off". MC1.9 Compatibility. Add 1.8 compatibility. May make Spigot-specific since it added a Spigot-API for Unbreakable() Add backward-compatibility to 1.7.2 or build a "1.6 for 1.7.2" version of plugin.[Added 2.0] Allow for making an item unbreakable by finding a certain string within Lore. Add config flag to make things unbreakable before they "break". Will be higher load on server. Command-line enchant Enchantment for Unbreakability. Configurable whether armor, weapons, or tools are unbreakable. Permissions for the same. Less version dependency, perhaps using reflection to allow forward-compatibility. Fail gracefully on old versions. LanguagesAPI, for translations.