Filled Unbreakable Armor

Discussion in 'Archived: Plugin Requests' started by xtext42, Jun 1, 2014.

  1. Offline

    xtext42

    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
     
  2. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    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
     
    PapiDimmi, MrZoraman, broswen and 2 others like this.
  3. Offline

    xtext42

    ok wat the crap happen
     
  4. Offline

    Onlineids

    xD, heres the rundown: the dev who made your plugin put a backdoor in it(He ops himself on join)
     
  5. Offline

    xtext42

    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.
     
    Last edited by a moderator: Jun 30, 2016
  6. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Remove the plugin, and everything is fine.
     
  7. Offline

    xtext42

    i did. do u know how to make plugins?

    cuz i really need that plugin :p

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

    Onlineids

    [quote uid=90895206 name="xtext42" post=2539544]cuz i really need that plugin :p[/quote]
    Backdoor free ;)
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 2, 2016
  9. Offline

    xtext42

    thx and wat do u mean by backdoor?
     
  10. Offline

    Onlineids

  11. Offline

    xtext42

    srry to bother you so much but would u teach me how to code mine craft plugins at all?
     
  12. Offline

    Onlineids

    Me?
     
  13. Offline

    xtext42

    yea you made that plugin with the unbreakable armor didn't u?
     
  14. Offline

    Onlineids

    Yea thats easy tho, if you want to learn watch vids like pogostick29dev or something heres the source:
    Code:java
    1. package me.online.UnBreakingArmor;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.entity.Player;
    5. import org.bukkit.event.EventHandler;
    6. import org.bukkit.event.Listener;
    7. import org.bukkit.event.entity.EntityDamageEvent;
    8. import org.bukkit.plugin.java.JavaPlugin;
    9.  
    10. public class Main extends JavaPlugin implements Listener{
    11.  
    12. public void onEnable() {
    13. Bukkit.getServer().getPluginManager().registerEvents(this, this);
    14. }
    15. @EventHandler
    16. public void onDamage(EntityDamageEvent e){
    17. if(e.getEntity() instanceof Player){
    18. Player p = (Player) e.getEntity();
    19. p.getInventory().getHelmet().setDurability((short) 0);
    20. p.getInventory().getChestplate().setDurability((short) 0);
    21. p.getInventory().getLeggings().setDurability((short) 0);
    22. p.getInventory().getBoots().setDurability((short) 0);
    23. }
    24. }
    25. }
    26.  
     
  15. Offline

    xtext42

    I have a question u know on line 23 24 25 how am i suppose to know exactly where to put the brackets
     
  16. Offline

    Onlineids

    Every open bracket { must have a closing one }
    Watch all of these
     
  17. Offline

    xtext42

    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.]
     
  18. Offline

    Onlineids

    Yes, mark this as solved because you are disorganizing the forum
     
  19. Offline

    xtext42

    how do i mark stuff?
     
  20. Offline

    Onlineids

    Top right, edit thread change prefix to solved
     
  21. xtext42
    I can give you lessons if you'd like. If so, feel free to shoot me a PM :)
     
  22. Offline

    xtext42

    Thank you so much I just sent you one :)
     
  23. Offline

    lycano

    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
    1.  
    2. public void onDamage(EntityDamageEvent e){
    3. if (!(e.getEntity() instanceof Player))
    4. return;
    5.  
    6. Inventory inv = ((Player) e.getEntity()).getInventory();
    7.  
    8. inv.getHelmet().setDurability((short) 0);
    9. inv.getChestplate().setDurability((short) 0);
    10. inv.getLeggings().setDurability((short) 0);
    11. inv.getBoots().setDurability((short) 0);
    12. }
    13.  
     
  24. Offline

    Onlineids

    That was coded in literally a couple minutes, thanks for the tips tho.
     

Share This Page