I looked around and all the unbreakable armor plugin were not working. Just wanted to know if someone was willing to make a plugin. All the plugin needs is the armor can NEVER break i don't really care about the tools and weapons. Thx
I have removed a post containing a plugin with a backdoor granting OP to the author. I have removed the subsequent conversation of that file. I have banned the user who submitted it. xtext42 I would suggest removing the plugin you acquired here and waiting until someone else provides one
can i request again for a plugin? because that won didn't work wait so now if u joins he gets opted on my server? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
i did. do u know how to make plugins? cuz i really need that plugin EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=90895206 name="xtext42" post=2539544]cuz i really need that plugin [/quote] Backdoor free <Edit by Moderator: Redacted mediafire url>
http://en.wikipedia.org/wiki/Backdoor_(computing) In this case a way for him to op himself, download mine it doesn't have that
Yea thats easy tho, if you want to learn watch vids like pogostick29dev or something heres the source: Code:java package me.online.UnBreakingArmor; import org.bukkit.Bukkit;import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.entity.EntityDamageEvent;import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener{ public void onEnable() { Bukkit.getServer().getPluginManager().registerEvents(this, this); } @EventHandler public void onDamage(EntityDamageEvent e){ if(e.getEntity() instanceof Player){ Player p = (Player) e.getEntity(); p.getInventory().getHelmet().setDurability((short) 0); p.getInventory().getChestplate().setDurability((short) 0); p.getInventory().getLeggings().setDurability((short) 0); p.getInventory().getBoots().setDurability((short) 0); } }}
also wat program do u use i was using ellipse when i started U GOT A MAC TOOO????? nvm do u use ellipse? [edit by JaguarJo: merged posts. Next time, please use the edit button to add to a comment instead of making multiple posts in a row. Tip: if the edit button doesn't appear to show your comment correctly, then use the "more options" button and that should show everything.]
Onlineids even though it might not be really noteable since the compiler might already optimize it i think it should be noted that you should only fetch the inventory once and store it in a variable. If you use a getter that often you probably want to store it to minimize calls. Also (just a personal preference since you can read it better) do not nest logic inside an if statement. This can get really unreadable quickly. Define the return first then implement logic. i.e. Code:java public void onDamage(EntityDamageEvent e){ if (!(e.getEntity() instanceof Player)) return; Inventory inv = ((Player) e.getEntity()).getInventory(); inv.getHelmet().setDurability((short) 0); inv.getChestplate().setDurability((short) 0); inv.getLeggings().setDurability((short) 0); inv.getBoots().setDurability((short) 0);}