Package com.iCo6.command

Examples of com.iCo6.command.Parser$InvalidSyntaxException


        }
      }
    }
    else if(Bukkit.getPluginManager().getPlugin("iConomy") instanceof iConomy)
    {
      iConomyEcon = new Accounts();
     
      if(iConomyEcon != null)
        Bukkit.getLogger().fine("iConomy detected and connected, economy available.");
    }
   
View Full Code Here


    }

    @Override
    public double getBalance(String playerName) {
        this.checkExist(playerName);
        return new Accounts().get(playerName).getHoldings().getBalance();
    }
View Full Code Here

    }

    @Override
    public boolean add(String playerName, double amount) {
        this.checkExist(playerName);
        new Accounts().get(playerName).getHoldings().add(amount);
        return true;
    }
View Full Code Here

            Messaging.send(sender, tag + template.parse());
            return false;
        }

        Account holder = new Account(from.getName());
        Holdings holdings = holder.getHoldings();

        if(holdings.getBalance() < amount) {
            template.set(Template.Node.ERROR_FUNDS);
            Messaging.send(sender, tag + template.parse());
            return false;
        }

        Account account = new Account(name);
        holdings.subtract(amount);
        account.getHoldings().add(amount);

        template.set(Template.Node.PAYMENT_TO);
        template.add("name", name);
        template.add("amount", iConomy.format(amount));
View Full Code Here

    public EconomyResponse withdrawPlayer(String playerName, double amount) {
        if (amount < 0) {
            return new EconomyResponse(0, 0, ResponseType.FAILURE, "Cannot withdraw negative funds");
        }

        Holdings holdings = accounts.get(playerName).getHoldings();
        if (holdings.hasEnough(amount)) {
            holdings.subtract(amount);
            return new EconomyResponse(amount, holdings.getBalance(), ResponseType.SUCCESS, null);
        } else {
            return new EconomyResponse(0, holdings.getBalance(), ResponseType.FAILURE, "Insufficient funds");
        }
    }
View Full Code Here

    public EconomyResponse depositPlayer(String playerName, double amount) {
        if (amount < 0) {
            return new EconomyResponse(0, 0, ResponseType.FAILURE, "Cannot desposit negative funds");
        }

        Holdings holdings = accounts.get(playerName).getHoldings();
        holdings.add(amount);
        return new EconomyResponse(amount, holdings.getBalance(), ResponseType.SUCCESS, null);
    }
View Full Code Here

            Thrun.init(new Runnable() {
                public void run() {
                    long time = Constants.Nodes.InterestTime.getLong() * 1000L;

                    Interest = new Timer();
                    Interest.scheduleAtFixedRate(new Interest(getDataFolder().getPath()), time, time);
                }
            });
        }

        if(Constants.Nodes.Purging.getBoolean()) {
View Full Code Here

    public boolean hasUnder(double amount) {
        return amount > this.getBalance();
    }

    private void math(double amount, double balance, double ending) {
        HoldingsUpdate Event = new HoldingsUpdate(this.name, balance, ending, amount);
        iConomy.Server.getPluginManager().callEvent(Event);

        if(!Event.isCancelled())
            setBalance(ending);
    }
View Full Code Here

            // Setup Configuration
            Constants.load(new File(directory, "Config.yml"));

            // Setup Template
            Template = new Template(directory.getPath(), "Template.yml");

            // Upgrade Template to 6.0.9b
            LinkedHashMap<String, String> nodes = new LinkedHashMap<String, String>();
            nodes.put("top.opening", "<green>-----[ <white>Wealthiest Accounts <green>]-----");
            nodes.put("top.item", "<gray>+i. <green>+name <gray>- <white>+amount");
View Full Code Here

        if(iConomy.Server.getPlayer(name) == null)
            return;

        String tag = iConomy.Template.color(Template.Node.TAG_MONEY);

        Template template = iConomy.Template;
        template.set(Template.Node.PERSONAL_BALANCE);
        template.add("balance", getHoldings().getBalance());

        Messaging.send(player, tag + template.parse());
    }
View Full Code Here

TOP

Related Classes of com.iCo6.command.Parser$InvalidSyntaxException

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.