hey guys, need plugin to have permission to mine or make certain items

Discussion in 'Archived: Plugin Requests' started by Feenix, Aug 20, 2012.

  1. Offline

    Feenix

    like for example, you would need a perm using essentials, to be either able to mine diamonds, or a perm to make diamonds armor and tools and weapon. gold and iron and diamonds would each have their own group, so if someone had right for diamond but not gold or vice versa then he would only be able to mine or make what he is allowed.

    can anyone help?
     
  2. Offline

    Kingstarwest

    Get a plugin called Skript!
    This should be it, I'm fairly new to it but this should be the code on it.


    Code:
    on mine of diamond:
      permission: skript.diamond

    If not just ask on the help forum :)
     
  3. Offline

    Njol

    I don't think that Skript is the plugin you're looking for as you can't control crafting with it yet.
     
  4. Offline

    Feenix

    funny enough after i posted i found it and im looking into it. i might not be able to stop crafting but i can stop the mining. XD which is just as good. if they can't mine it, no diamond armor unless u got the perm. ty much
     
  5. Offline

    Njol

    Players can still get the items (ores/armour) from other players. But if you still want to use Skript for mining permissions here's a basic trigger which denies mining diamonds for players who do not have the "mine.diamond" permission:
    Code:
    on mine of diamond:
      player doesn't have the permission "mine.diamonds"
      cancel event
     
  6. Offline

    Kingstarwest

  7. Offline

    Feenix

    hey im having issue with the coding. i tryed several way of writing it but it's never happy i don't understand why can u help? also it doesn't recognize the trigger pickup.

    here's a copy of the code.
    on mine of diamond block:
    player doesn't have permission "skript.diamond":
    send "You Do Not Have Permission To Mine Diamonds, You Need To Find The Diamond City" to player
    cancel event
    else:
    player has permission "skript.diamond":
    send "You Do Have Permission To Mine Diamonds" to player

    on mine of diamond ore:
    player doesn't have permission "skript.diamond":
    send "You Do Not Have Permission To Mine Diamonds, You Need To Find The Diamond City" to player
    cancel event
    stop
    else:
    player has permission "skript.diamond":
    send "You Do Have Permission To Mine Diamonds" to player
    stop
    on pickup of diamond block:
    player doesn't have the permission "skript.diamond"
    cancel event
    on pickup of diamond ore:
    player doesn't have the permission "skript.diamond"
    cancel event

    i think i found it, it's like this...... but the pick up still give me errors in log. can u help on that and double check my coding?



    on mine of diamond block:
    player doesn't have permission "skript.diamond":
    send "You Do Not Have Permission To Mine Diamonds, You Need To Find The Diamond City" to player
    cancel event
    else:
    player has permission "skript.diamond":
    send "You Do Have Permission To Mine Diamonds" to player

    on mine of diamond ore:
    player doesn't have permission "skript.diamond":
    send "You Do Not Have Permission To Mine Diamonds, You Need To Find The Diamond City" to player
    cancel event
    stop
    else:
    player has permission "skript.diamond":
    send "You Do Have Permission To Mine Diamonds" to player
    stop
    on pickup of diamond block:
    player doesn't have the permission "skript.diamond"
    cancel event
    on pickup of diamond ore:
    player doesn't have the permission "skript.diamond"
    cancel event

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

    Njol

    Try this:
    <<code text>>
    on pickup:
    # check for all kinds of diamond items
    item is a diamond, diamond ore, diamond block, diamond armour or diamond tool
    # continue with your script here
    <</code>>

    BTW: you can post code/scripts in {{{<<code text>><</code>>}}} tags ;)
     
  9. Offline

    Feenix

    for anyone interested in the same plugin as me, i finished the coding of it. so if you guys want to download my code, using skript plugin u can do so at http://ygss.dyndns.org/Minecraft/skript
    this disables, unless you got the permission, to mine gold or diamond, to drop gold or diamond, unfortunatly wasn't able to prevent pick up but this should be good enough, and also damages the player if he tryes to use a gold or diamond item anyway. give him 3 heart damage per click of the item.

    this way they will have to explore and find the gold and or diamond city in my case, once they do that then they will have the perm once they find it. XD
     

Share This Page