Plugin category: Mech Suggested name: Unbreakable What I want: A plugin that allows an admin to make a particular item unbreakable (So it does not degrade) To be clear, It should not make all of one type of an item to be unbreakable, but only that specific item. I'd prefer it not to be done with enchantments as Unbreaking100000 on an item isn't very attractive, unless you can disguise or hide the enchantment somehow. Ideas for commands: /unbreakable - sets held item unbreakable /breakable - sets held item breakable Ideas for permissions: unbreakable.use - Allows use of unbreakable and breakable commands. When I'd like it by: Anytime.
Svedrigailov I'll make this for you, but I have a baseball game to go to tonight. In the end, it should be made by tomorrow.
If you want, sure You could do the event portion while I'm gone My advice, (don't look if you want to try and figure it out) Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Toy around with an event (block break perhaps) And see if you can figure out where something like this should go. Set Durability works with a short variable. (as in the date type "short") Code: p.getItemInHand().setDurability(); This way, you can handle the event portion. When I come back, I will finish up the plugin and add in commands. Thanks for the help!
Xerfox I do not have Saros, I just assumed you would message me the code once it was done. d: Anyways, I'm going to resume work, so let me know if you have something
I have run into a little puzzle here. Dunsuro would you like to add me on skype please? Skype: The_Xerfox
On my way! Just starting now! (Adding more stuff into the code before the actually part xD Just thought I would copy and paste it in there haha. Code: package me.xerfox.Unbreakable; import org.bukkit.plugin.java.JavaPlugin; public final class Unbreakable_Main extends JavaPlugin { short p.getItemInHand( ).setDurability; } Here goes nothing
Svedrigailov I've basically finished the plugin, but there are a few tweaks I want to work on tomorrow I'm kinda tired right now, thus why I don't want to continue work tonight. Things I want to fix list: -Right now, the items want to fully repair themselves while they are unbreakable, I dunno if this is the goal, or if keeping original durability is what we want. (I assume you want to keep the tools durability stable) -Making items breakable again causes issues.
Please take as much time as you need, I would prefer you take more time and end up with a better quality plugin. You are correct in your assumptions.
Svedrigailov Hello mate, I've finished the plugin and tested it out! You can download it here <Edit by Moderator: Redacted mediafire url> Now, it works like this. /unbreakable makes a tools durability go up instead of down. In the end, this makes it so that it will never break. /breakable makes a tools durability reset to what it was before. Making it breakable Aliases for the commands are, /unbreak, or /break Permission Node: unbreakable.use
You're amazing! Thank you so much. I'll tell my children stories about your heroism. [quote uid=90681987 name="Dunsuro" post=1648968]Svedrigailov Hello mate, I've finished the plugin and tested it out! You can download it here <Edit by Moderator: Redacted mediafire url> Now, it works like this. /unbreakable makes a tools durability go up instead of down. In the end, this makes it so that it will never break. /breakable makes a tools durability reset to what it was before. Making it breakable Aliases for the commands are, /unbreak, or /break Permission Node: unbreakable.use[/quote] Hey, I hope I am allowed to point out flaws. With a tool that is used to break blocks, this works great, however it does not work so well with things like armor, weapons, flint and steel, and fishing rods. Is there any way it can be changed to accommodate these? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Svedrigailov Oh, I had completely forgotten that armor and such had durability Haha. Although I'm not sure if I know how it would work on some things. I know I could do flint and steel and weapons. I can definitely try to do the fishing rods and armor, although that may be a bit more complicated. Done list ----------- Flint n Steel - Finished (works same way as other tools) Weapons - Finished (works same way as other tools) Hoe - Finished (works just like other tools) Fishing Rod - Finished (works just like other tools) Armor - Finished (works just like the rest) I am done!!! Svedrigailov You can download the new version here! <Edit by Moderator: Redacted mediafire url> A word about armor, In order to make it unbreakable, you must unequip, select each individual piece, and type /unbreakable then you re-equip When you want to make it breakable, you must unequip, select each piece, and type /breakable, then re-equip. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=90681987 name="Dunsuro" post=1649419]Svedrigailov You can download the new version here! <Edit by Moderator: Redacted mediafire url> A word about armor, In order to make it unbreakable, you must unequip, select each individual piece, and type /unbreakable then you re-equip When you want to make it breakable, you must unequip, select each piece, and type /breakable, then re-equip.[/quote] Thank you very much! I'll give it a go!