Plugin Request /Unbreakable

Discussion in 'Plugin Help/Development/Requests' started by TheMrJezza, Mar 6, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    TheMrJezza

    Plugin category: Admin

    Suggested name: NoBreak Blocks

    What I want: I'd like a /unbreakable command for my admins, when this command is executed by an admin, every block placed that admin will become unbreakable. When a normal player tries to break a block, nothing happens, not even a message. But if someone (Admins) has the permission unbreak.admin.break they can break any unbreakable block. I still want normal players without unbreak.admin.break to still use all redstone blocks, buttons, levers etc. also all containers can be used, chests, furnaces, crafting tables, droppers, hoppers etc.


    Ideas for commands: /unbreakable

    Ideas for permissions: unbreak.admin.break unbreak.unbreakable

    When I'd like it by: Whenever Possible
     
    Last edited: Mar 6, 2015
  2. Offline

    LeePMC

    Heres how to to do it, you would just write

    Code:
    @EventHandler
    public void onBlockBreak(EventForBlockBreak e) {
    
    Player p = e.getPlayer();
    
    if(p.hasPermission("unbreak.admin.break") {
    
    //do nothing, because they are allowed to break the block
    
    } else {
    
    e.setCancled(true);
    
    }
    
    }
    but this isn't per world, you will have to search up p.getWorld() and how to us that in this sort of sense, because i don't want to spoon feed answers to you because coding is all about problem solving, and if someone else solves the problem for you, then its not coding, hop you understand what I'm trying to say, good luck with you plugin development :)
     
  3. Offline

    Shahblox

    TF are you talking about lol? This guy is requesting a plugin, he can have 0 sense of knowledge in code and can make a plugin request if he wants. I think you're just confused.
     
  4. Offline

    LeePMC

    @Shahblox the post was not as it looks right now yesterday, i couldnt see the headings like What i want etc. it was originally 1 paragraph saying that he wanted an unbreakable command, i thought (by the way it was set out) that he meaned he wanted to make the plugin for his admins... sorry for the confusion but the post was not as properly set out as it is right now :/

    EDIT: and no, i am not onfused thank you very much... you my friend are just wanting to comment on everyones mistakes
     
  5. Offline

    Shahblox

    Alright sorry for that m8. And also I never commented about someone's mistake on here until I saw ur post thank you very much. ;)
     
  6. Offline

    TheMrJezza

    Well thanks for the code, but although this seems simple enough, open eclipse, create a project, create a package, make a class and add the code, I still think its better if I leave it to people who are a lot better then me and who know what they are doing, I won't just waste your code though, I will try to make this myself, but Its still an open request, and I still would like someone to try to make this.
     
Thread Status:
Not open for further replies.

Share This Page