How to make custom permissions

Discussion in 'Plugin Development' started by CraterHater, Jun 9, 2015.

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

    CraterHater

    How do i make a permission that is called: Classes.UseWeapon1
    And set it to default false and make it so that if the player has the permission he can than do specific stuff i made. Also, how do i set a players permission after this has been done ^.

    Help would be appreciated.
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    CraterHater

  4. Online

    timtower Administrator Administrator Moderator

  5. @CraterHater
    Take a look at the links Tim and I posted, there's more than enough information there. If you need help after trying something then I'll be happy to help.
     
  6. Offline

    CraterHater

    Right i did a little thing but i can't figure out how to make the permission real.
    Code:
        @EventHandler
        public void onPlayerInteract1(PlayerInteractEvent event) {
            Action a = event.getAction();
            ItemStack is = event.getItem();
      
            if(a == Action.PHYSICAL ||  is == null ||  is.getType()==Material.AIR)
                return;
      
            if(is.getType()==Material.BOW)
            if(!event.getPlayer().hasPermission("Class.Scout")) {
                event.getPlayer().sendMessage("hi");
                return;
     
  7. Offline

    CraterHater

Thread Status:
Not open for further replies.

Share This Page