Package com.forgeessentials.economy.plots

Examples of com.forgeessentials.economy.plots.Plot


    @Override
    public void processCommandPlayer(EntityPlayer buyer, String[] args)
    {
        if (args.length == 3)
        {
            Plot plot = PlotManager.plotList.get(args[0]);
            EntityPlayer seller = UserIdent.getPlayerByUuid(plot.getOwner());
            OutputHandler.chatNotification(seller, "Player " + buyer.getDisplayName() + " offered to purchase plot " + plot.getName() + " for " + args[1]
                    + ". Type /sellplot <plotName> yes to accept, /sellplot <plotName> no to deny. This offer will expire in " + PlotManager.timeout + " seconds.");
            PlotManager.pendingOffers.put(plot.getName(), new Offer(plot, buyer, seller, Integer.parseInt(args[1])));
        }
        else{
            OutputHandler.chatError(buyer, "Incorrect syntax. Try this instead: <plotName> <amount>");
        }
View Full Code Here


            else
            {
                OutputHandler.chatNotification(player, "Listing all plots for sale:");
                for (String s : PlotManager.forSale)
                {
                    Plot plot = PlotManager.plotList.get(s);
                    printPlotDetails(player, plot);
                }
            }
        }
        else
View Full Code Here

    @Override
    public void processCommandPlayer(EntityPlayer player, String[] args)
    {
        PlayerInfo info = PlayerInfo.getPlayerInfo(player);
        Plot plot = new Plot(player.getEntityWorld(), info.getPoint1(), info.getPoint2(), Integer.parseInt(args[1]), args[0], player.getUniqueID());
        PlotManager.addPlot(plot);
    }
View Full Code Here

            else if (args[1].equals("yes"))
            {
                OutputHandler.chatNotification(offer.buyer, "The seller agreed to sell plot " + offer.plot.getName() + " to you. " + offer.amount + " will be deducted from your wallet.");
                APIRegistry.wallet.removeFromWallet(offer.amount, offer.buyer.getPersistentID());
                APIRegistry.wallet.addToWallet(offer.amount, seller.getPersistentID());
                Plot plot = offer.plot;
                plot.changeOwner(offer.buyer.getPersistentID());
                PlotManager.addPlot(plot);
                OutputHandler.chatNotification(seller, "Transaction complete. " + offer.amount + "added to your wallet.");
                OutputHandler.chatNotification(offer.buyer, "Transaction complete. You are now owner of " + plot.getName());
                PlotManager.pendingOffers.remove(args[0]);

            }
        }
    }
View Full Code Here

TOP

Related Classes of com.forgeessentials.economy.plots.Plot

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.