Examples of InsufficientPermissionException


Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

     
      Throwable  cause    = null;
     
      if (!scs.canManage(player, shop, true)) {
        // not enough permissions
        cause = new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION_REM_SHOWCASE.get());
       
      } else {
        // add the items from the shop
        notAdded = shop.getAmount() - ItemStackUtilities.addToInventory(player.getInventory(), shop.getItemStack(), shop.getAmount());
       
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

  @Override
  @EventHandler (ignoreCancelled=true, priority=EventPriority.HIGHEST)
  public void onShowCaseMemberRemoveEvent(ShowCaseMemberRemoveEvent scmre) {
    if (scmre.verify() && !scs.canManage(scmre.getPlayer(), scmre.getShop(), true)) {
      scmre.setCancelled(true);
      scmre.setCause(new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION_REM_MEMBER.get()));
    }
  }
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

  @Override
  @EventHandler (ignoreCancelled=true, priority=EventPriority.HIGHEST)
  public void onShowCaseOwnerSetEvent(ShowCaseOwnerSetEvent scose) {
    if (scose.verify() && !scs.isAdmin(scose.getPlayer())) {
      scose.setCancelled(true);
      scose.setCause(new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION_SET_OWNER.get()));
    }
  }
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

  @Override
  @EventHandler (ignoreCancelled=true, priority=EventPriority.HIGHEST)
  public void onShowCasePriceSetEvent(ShowCasePriceSetEvent scpse) {
    if (scpse.verify() && !scs.canManage(scpse.getPlayer(), scpse.getShop(), false)) {
      scpse.setCancelled(true);
      scpse.setCause(new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION_SET_PRICE.get()));
    }
  }
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

        amount = scpbe.getQuantity();
      }
     
      // insufficient permission
      if (!scs.canUse(player)) {
        cause = new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION.get());
       
      }
     
      // insufficient money
      else if (!scs.getBalanceHandler().hasEnough(player.getName(), amount*price)) {
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

        amount = scpse.getQuantity();
      }
     
      // insufficient permission
      if (!scs.canUse(player)) {
        cause = new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION.get());
       
      }
     
      // insufficient money
      else if (!scs.getBalanceHandler().hasEnough(shop.getOwner(), amount*price)) {
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

  @Override
  @EventHandler (ignoreCancelled=true, priority=EventPriority.HIGHEST)
  public void onShowCasePlayerExchangeEvent(ShowCasePlayerExchangeEvent scpee) {
    if (scpee.verify() && !scs.canUse(scpee.getPlayer())) {
      scpee.setCancelled(true);
      scpee.setCause(new InsufficientPermissionException(Term.ERROR_INSUFFICIENT_PERMISSION.get()));
    }
  }
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

  public boolean execute() throws MissingOrIncorrectArgumentException, InsufficientPermissionException {
    if (errorCheck())
      return true;
   
    if(Properties.blacklistedWorlds.contains(player.getWorld().getName()))
            throw new InsufficientPermissionException("`rYou are not allowed to create a showcase in this world."); //msg: blacklistError
   
    //Default values:
        int     amount     = 0;
        boolean    unlimited  = false;
        int     price     = 1;
View Full Code Here

Examples of com.kellerkindt.scs.exceptions.InsufficientPermissionException

    public boolean execute() throws MissingOrIncorrectArgumentException, InsufficientPermissionException {
        if(errorCheck())
            return true;

        if(Properties.blacklistedWorlds.contains(player.getWorld().getName()))
            throw new InsufficientPermissionException("`rYou are not allowed to create a showcase in this world."); //msg: blacklistError
       
        //Default values:
        int     amount     = 0;
        boolean    unlimited  = false;
        double     price     = 1.0;
View Full Code Here

Examples of org.springframework.social.InsufficientPermissionException

    } else if(errorType.equals("param_error")) {
      throw new ParamErrorException(code, errorType, message);
    } else if(errorType.equals("endpoint_error")) {
      throw new ResourceNotFoundException(message);
    } else if(errorType.equals("not_authorized")) {
      throw new InsufficientPermissionException(message);
    } else if(errorType.equals("rate_limit_exceeded")) {
      throw new RateLimitExceededException();
    } else if(errorType.equals("server_error")) {
      throw new InternalServerErrorException(message);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.