Package com.kellerkindt.scs.exceptions

Examples of com.kellerkindt.scs.exceptions.MissingOrIncorrectArgumentException


        try {
            amount = Integer.parseInt(args[1])
        } catch (Exception e) {}
       
        if (amount < 0)
            throw new MissingOrIncorrectArgumentException ();

        Messaging.send  (player, next);
        scs.addTodo    (player, new Todo (player, Type.GET_ITEMS, null, amount, null));
       
        return true;
View Full Code Here


        if(!scs.hasPermission(cs, permission)){
            throw new InsufficientPermissionException();
        }
       
        if(args.length < minArg){
            throw new MissingOrIncorrectArgumentException();
        }
       
        return false;
    }
View Full Code Here

                    is = Utilities.getItemStack(player, args[1]);
                    break;
            }
           
        } catch (Exception e) {
            throw new MissingOrIncorrectArgumentException ();
        }

        if (is == null || is.getTypeId() == 0) {
          throw new MissingOrIncorrectArgumentException (Term.ITEM_MISSING.get());
        }

        // if the id already exists, the ShopHandler will set a new one
        DisplayShop  shop  = new DisplayShop(UUID.randomUUID(), player.getName(), null, is.clone());
       
View Full Code Here

        try {
            price = Double.parseDouble(args[1]);
        } catch (Exception e) {}
       
        if (price < 0)
            throw new MissingOrIncorrectArgumentException();
       
        Messaging.send(player, next);
        scs.addTodo(player, new Todo (player, Type.SET_PRICE, null, price, null));
       
        return true;
View Full Code Here

            try {
                unit = Integer.parseInt(args[1])
            } catch (Exception e) {}
           
            if(unit < 1)
                throw new MissingOrIncorrectArgumentException();

            ShowCaseStandalone.pv.setPlayerTransactionAmount(player, unit);
            Messaging.send(player, Term.MESSAGE_SET_UNIT.get() + unit);
           
        } else
View Full Code Here

                  this.cmd = new RepairCmd(sender, args);
               
               
                //Unknown
                else
                    throw new MissingOrIncorrectArgumentException(Term.ERROR_COMMAND_UNKNOWN.get());
               
                return cmd.execute();
               
            } catch (MissingOrIncorrectArgumentException miae) {
                Messaging.send(sender, "`r" + miae.getMessage());
View Full Code Here

                    price = Double.parseDouble(args[3]);
                    break;
            }
           
        } catch (Exception e) {
            throw new MissingOrIncorrectArgumentException ();
        }
        if (is == null || is.getTypeId() == 0) {
          throw new MissingOrIncorrectArgumentException (Term.ITEM_MISSING.get());
        }

        // if the id already exists, the ShopHandler will set a new one
        SellShop  shop  = new SellShop(UUID.randomUUID(), player.getName(), null, is.clone());
       
View Full Code Here

        try {
            amount = Integer.parseInt(args[1])
        } catch (Exception e) {}
       
        if (amount < 0)
            throw new MissingOrIncorrectArgumentException ();

        Messaging.send(player, next);
        scs.addTodo(player, new Todo (player, Type.ADD_ITEMS, null, amount, null));
        return true;
    }
View Full Code Here

                return player.getItemInHand();
            } else {
                return Utilities.getItemStackFromString(arg.toUpperCase());
            }
        } catch (Exception ex) {
            throw new MissingOrIncorrectArgumentException();
        }
    }
View Full Code Here

            Messaging.send(cs, Term.ERROR_IMPORT.get("sql_scs"));
          }
        }

        else
            throw new MissingOrIncorrectArgumentException();
       
        return true;
    }
View Full Code Here

TOP

Related Classes of com.kellerkindt.scs.exceptions.MissingOrIncorrectArgumentException

Copyright © 2018 www.massapicom. 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.