Search in sources :

Example 1 with PlotExpression

use of com.plotsquared.core.util.PlotExpression in project PlotSquared by IntellectualSites.

the class Delete method onCommand.

@Override
public boolean onCommand(final PlotPlayer<?> player, String[] args) {
    Location location = player.getLocation();
    final Plot plot = location.getPlotAbs();
    if (plot == null) {
        player.sendMessage(TranslatableCaption.of("errors.not_in_plot"));
        return false;
    }
    if (!plot.hasOwner()) {
        player.sendMessage(TranslatableCaption.of("info.plot_unowned"));
        return false;
    }
    if (plot.getVolume() > Integer.MAX_VALUE) {
        player.sendMessage(TranslatableCaption.of("schematics.schematic_too_large"));
        return false;
    }
    Result eventResult = this.eventDispatcher.callDelete(plot).getEventResult();
    if (eventResult == Result.DENY) {
        player.sendMessage(TranslatableCaption.of("events.event_denied"), Template.of("value", "Delete"));
        return true;
    }
    boolean force = eventResult == Result.FORCE;
    if (!force && !plot.isOwner(player.getUUID()) && !Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_DELETE)) {
        player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
        return false;
    }
    final PlotArea plotArea = plot.getArea();
    final java.util.Set<Plot> plots = plot.getConnectedPlots();
    final int currentPlots = Settings.Limit.GLOBAL ? player.getPlotCount() : player.getPlotCount(location.getWorldName());
    Runnable run = () -> {
        if (plot.getRunning() > 0) {
            player.sendMessage(TranslatableCaption.of("errors.wait_for_timer"));
            return;
        }
        final long start = System.currentTimeMillis();
        if (Settings.Teleport.ON_DELETE) {
            plot.getPlayersInPlot().forEach(playerInPlot -> plot.teleportPlayer(playerInPlot, TeleportCause.COMMAND_DELETE, result -> {
            }));
        }
        boolean result = plot.getPlotModificationManager().deletePlot(player, () -> {
            plot.removeRunning();
            if (this.econHandler.isEnabled(plotArea)) {
                PlotExpression valueExr = plotArea.getPrices().get("sell");
                double value = plots.size() * valueExr.evaluate(currentPlots);
                if (value > 0d) {
                    this.econHandler.depositMoney(player, value);
                    player.sendMessage(TranslatableCaption.of("economy.added_balance"), Template.of("money", this.econHandler.format(value)));
                }
            }
            player.sendMessage(TranslatableCaption.of("working.deleting_done"), Template.of("amount", String.valueOf(System.currentTimeMillis() - start)), Template.of("plot", plot.getId().toString()));
            eventDispatcher.callPostDelete(plot);
        });
        if (result) {
            plot.addRunning();
        } else {
            player.sendMessage(TranslatableCaption.of("errors.wait_for_timer"));
        }
    };
    if (hasConfirmation(player)) {
        CmdConfirm.addPending(player, getCommandString() + ' ' + plot.getId(), run);
    } else {
        TaskManager.runTask(run);
    }
    return true;
}
Also used : TeleportCause(com.plotsquared.core.events.TeleportCause) Location(com.plotsquared.core.location.Location) Permissions(com.plotsquared.core.util.Permissions) NonNull(org.checkerframework.checker.nullness.qual.NonNull) Plot(com.plotsquared.core.plot.Plot) Inject(com.google.inject.Inject) TaskManager(com.plotsquared.core.util.task.TaskManager) Permission(com.plotsquared.core.permissions.Permission) EconHandler(com.plotsquared.core.util.EconHandler) Result(com.plotsquared.core.events.Result) PlotPlayer(com.plotsquared.core.player.PlotPlayer) TranslatableCaption(com.plotsquared.core.configuration.caption.TranslatableCaption) PlotExpression(com.plotsquared.core.util.PlotExpression) Settings(com.plotsquared.core.configuration.Settings) PlotArea(com.plotsquared.core.plot.PlotArea) Template(net.kyori.adventure.text.minimessage.Template) EventDispatcher(com.plotsquared.core.util.EventDispatcher) PlotExpression(com.plotsquared.core.util.PlotExpression) PlotArea(com.plotsquared.core.plot.PlotArea) Plot(com.plotsquared.core.plot.Plot) Location(com.plotsquared.core.location.Location) Result(com.plotsquared.core.events.Result)

Example 2 with PlotExpression

use of com.plotsquared.core.util.PlotExpression in project PlotSquared by IntellectualSites.

the class MainCommand method execute.

@Override
public CompletableFuture<Boolean> execute(final PlotPlayer<?> player, String[] args, RunnableVal3<Command, Runnable, Runnable> confirm, RunnableVal2<Command, CommandResult> whenDone) {
    // Optional command scope //
    Location location = null;
    Plot plot = null;
    boolean tp = false;
    if (args.length >= 2) {
        PlotArea area = player.getApplicablePlotArea();
        Plot newPlot = Plot.fromString(area, args[0]);
        if (newPlot != null && (player instanceof ConsolePlayer || newPlot.getArea().equals(area) || Permissions.hasPermission(player, Permission.PERMISSION_ADMIN) || Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_AREA_SUDO)) && !newPlot.isDenied(player.getUUID())) {
            final Location newLoc;
            if (newPlot.getArea() instanceof SinglePlotArea) {
                newLoc = newPlot.isLoaded() ? newPlot.getCenterSynchronous() : Location.at("", 0, 0, 0);
            } else {
                newLoc = newPlot.getCenterSynchronous();
            }
            if (player.canTeleport(newLoc)) {
                // Save meta
                try (final MetaDataAccess<Location> locationMetaDataAccess = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LOCATION)) {
                    location = locationMetaDataAccess.get().orElse(null);
                    locationMetaDataAccess.set(newLoc);
                }
                try (final MetaDataAccess<Plot> plotMetaDataAccess = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
                    plot = plotMetaDataAccess.get().orElse(null);
                    plotMetaDataAccess.set(newPlot);
                }
                tp = true;
            } else {
                player.sendMessage(TranslatableCaption.of("border.denied"));
            }
            // Trim command
            args = Arrays.copyOfRange(args, 1, args.length);
        }
        if (args.length >= 2 && !args[0].isEmpty() && args[0].charAt(0) == '-') {
            if ("f".equals(args[0].substring(1))) {
                confirm = new RunnableVal3<>() {

                    @Override
                    public void run(Command cmd, Runnable success, Runnable failure) {
                        if (area != null && PlotSquared.platform().econHandler().isEnabled(area)) {
                            PlotExpression priceEval = area.getPrices().get(cmd.getFullId());
                            double price = priceEval != null ? priceEval.evaluate(0d) : 0d;
                            if (price != 0d && PlotSquared.platform().econHandler().getMoney(player) < price) {
                                if (failure != null) {
                                    failure.run();
                                }
                                return;
                            }
                        }
                        if (success != null) {
                            success.run();
                        }
                    }
                };
                args = Arrays.copyOfRange(args, 1, args.length);
            } else {
                player.sendMessage(TranslatableCaption.of("errors.invalid_command_flag"));
                return CompletableFuture.completedFuture(false);
            }
        }
    }
    try {
        super.execute(player, args, confirm, whenDone);
    } catch (CommandException e) {
        throw e;
    } catch (Throwable e) {
        e.printStackTrace();
        String message = e.getMessage();
        if (message != null) {
            player.sendMessage(TranslatableCaption.of("errors.error"), net.kyori.adventure.text.minimessage.Template.of("value", message));
        } else {
            player.sendMessage(TranslatableCaption.of("errors.error_console"));
        }
    }
    // Reset command scope //
    if (tp && !(player instanceof ConsolePlayer)) {
        try (final MetaDataAccess<Location> locationMetaDataAccess = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LOCATION)) {
            if (location == null) {
                locationMetaDataAccess.remove();
            } else {
                locationMetaDataAccess.set(location);
            }
        }
        try (final MetaDataAccess<Plot> plotMetaDataAccess = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
            if (plot == null) {
                plotMetaDataAccess.remove();
            } else {
                plotMetaDataAccess.set(plot);
            }
        }
    }
    return CompletableFuture.completedFuture(true);
}
Also used : SinglePlotArea(com.plotsquared.core.plot.world.SinglePlotArea) PlotArea(com.plotsquared.core.plot.PlotArea) Plot(com.plotsquared.core.plot.Plot) ConsolePlayer(com.plotsquared.core.player.ConsolePlayer) SinglePlotArea(com.plotsquared.core.plot.world.SinglePlotArea) PlotExpression(com.plotsquared.core.util.PlotExpression) Location(com.plotsquared.core.location.Location)

Example 3 with PlotExpression

use of com.plotsquared.core.util.PlotExpression in project PlotSquared by IntellectualSites.

the class MainCommand method onCommand.

public static boolean onCommand(final PlotPlayer<?> player, String... args) {
    final EconHandler econHandler = PlotSquared.platform().econHandler();
    if (args.length >= 1 && args[0].contains(":")) {
        String[] split2 = args[0].split(":");
        if (split2.length == 2) {
            // Ref: c:v, this will push value to the last spot in the array
            // ex. /p h:2 SomeUsername
            // > /p h SomeUsername 2
            String[] tmp = new String[args.length + 1];
            tmp[0] = split2[0];
            tmp[args.length] = split2[1];
            if (args.length >= 2) {
                System.arraycopy(args, 1, tmp, 1, args.length - 1);
            }
            args = tmp;
        }
    }
    try {
        getInstance().execute(player, args, new RunnableVal3<>() {

            @Override
            public void run(final Command cmd, final Runnable success, final Runnable failure) {
                if (cmd.hasConfirmation(player)) {
                    CmdConfirm.addPending(player, cmd.getUsage(), () -> {
                        PlotArea area = player.getApplicablePlotArea();
                        if (area != null && econHandler.isEnabled(area)) {
                            PlotExpression priceEval = area.getPrices().get(cmd.getFullId());
                            double price = priceEval != null ? priceEval.evaluate(0d) : 0d;
                            if (econHandler.getMoney(player) < price) {
                                if (failure != null) {
                                    failure.run();
                                }
                                return;
                            }
                        }
                        if (success != null) {
                            success.run();
                        }
                    });
                    return;
                }
                PlotArea area = player.getApplicablePlotArea();
                if (area != null && econHandler.isEnabled(area)) {
                    PlotExpression priceEval = area.getPrices().get(cmd.getFullId());
                    double price = priceEval != null ? priceEval.evaluate(0d) : 0d;
                    if (price != 0d && econHandler.getMoney(player) < price) {
                        if (failure != null) {
                            failure.run();
                        }
                        return;
                    }
                }
                if (success != null) {
                    success.run();
                }
            }
        }, new RunnableVal2<>() {

            @Override
            public void run(Command cmd, CommandResult result) {
            // Post command stuff!?
            }
        }).thenAccept(result -> {
        // TODO: Something with the command result
        });
    } catch (CommandException e) {
        e.perform(player);
    }
    // Always true
    return true;
}
Also used : EconHandler(com.plotsquared.core.util.EconHandler) PlotExpression(com.plotsquared.core.util.PlotExpression) SinglePlotArea(com.plotsquared.core.plot.world.SinglePlotArea) PlotArea(com.plotsquared.core.plot.PlotArea) RunnableVal2(com.plotsquared.core.util.task.RunnableVal2) RunnableVal3(com.plotsquared.core.util.task.RunnableVal3)

Example 4 with PlotExpression

use of com.plotsquared.core.util.PlotExpression in project PlotSquared by IntellectualSites.

the class Claim method onCommand.

@Override
public boolean onCommand(final PlotPlayer<?> player, String[] args) {
    String schematic = null;
    if (args.length >= 1) {
        schematic = args[0];
    }
    Location location = player.getLocation();
    Plot plot = location.getPlotAbs();
    if (plot == null) {
        player.sendMessage(TranslatableCaption.of("errors.not_in_plot"));
        return false;
    }
    final PlayerClaimPlotEvent event = this.eventDispatcher.callClaim(player, plot, schematic);
    schematic = event.getSchematic();
    if (event.getEventResult() == Result.DENY) {
        player.sendMessage(TranslatableCaption.of("events.event_denied"), Template.of("value", "Claim"));
        return true;
    }
    boolean force = event.getEventResult() == Result.FORCE;
    int currentPlots = Settings.Limit.GLOBAL ? player.getPlotCount() : player.getPlotCount(location.getWorldName());
    final PlotArea area = plot.getArea();
    try (final MetaDataAccess<Integer> metaDataAccess = player.accessPersistentMetaData(PlayerMetaDataKeys.PERSISTENT_GRANTED_PLOTS)) {
        int grants = 0;
        if (currentPlots >= player.getAllowedPlots() && !force) {
            if (metaDataAccess.isPresent()) {
                grants = metaDataAccess.get().orElse(0);
                if (grants <= 0) {
                    player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), Template.of("amount", String.valueOf(grants)));
                    metaDataAccess.remove();
                }
            } else {
                player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), Template.of("amount", String.valueOf(player.getAllowedPlots())));
                return false;
            }
        }
        if (!plot.canClaim(player)) {
            player.sendMessage(TranslatableCaption.of("working.plot_is_claimed"));
            return false;
        }
        if (schematic != null && !schematic.isEmpty()) {
            if (area.isSchematicClaimSpecify()) {
                if (!area.hasSchematic(schematic)) {
                    player.sendMessage(TranslatableCaption.of("schematics.schematic_invalid_named"), Template.of("schemname", schematic), Template.of("reason", "non-existent"));
                }
                if (!Permissions.hasPermission(player, Permission.PERMISSION_CLAIM_SCHEMATIC.format(schematic)) && !Permissions.hasPermission(player, "plots.admin.command.schematic") && !force) {
                    player.sendMessage(TranslatableCaption.of("permission.no_schematic_permission"), Template.of("value", schematic));
                }
            }
        }
        if (this.econHandler.isEnabled(area) && !force) {
            PlotExpression costExr = area.getPrices().get("claim");
            double cost = costExr.evaluate(currentPlots);
            if (cost > 0d) {
                if (!this.econHandler.isSupported()) {
                    player.sendMessage(TranslatableCaption.of("economy.vault_or_consumer_null"));
                    return false;
                }
                if (this.econHandler.getMoney(player) < cost) {
                    player.sendMessage(TranslatableCaption.of("economy.cannot_afford_plot"), Template.of("money", this.econHandler.format(cost)), Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))));
                    return false;
                }
                this.econHandler.withdrawMoney(player, cost);
                player.sendMessage(TranslatableCaption.of("economy.removed_balance"), Template.of("money", this.econHandler.format(cost)), Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))));
            }
        }
        if (grants > 0) {
            if (grants == 1) {
                metaDataAccess.remove();
            } else {
                metaDataAccess.set(grants - 1);
            }
            player.sendMessage(TranslatableCaption.of("economy.removed_granted_plot"), Template.of("usedGrants", String.valueOf((grants - 1))), Template.of("remainingGrants", String.valueOf(grants)));
        }
    }
    if (!Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_BYPASS_BORDER)) {
        int border = area.getBorder();
        if (border != Integer.MAX_VALUE && plot.getDistanceFromOrigin() > border && !force) {
            player.sendMessage(TranslatableCaption.of("border.denied"));
            return false;
        }
    }
    plot.setOwnerAbs(player.getUUID());
    final String finalSchematic = schematic;
    DBFunc.createPlotSafe(plot, () -> {
        try {
            TaskManager.getPlatformImplementation().sync(() -> {
                if (!plot.claim(player, true, finalSchematic, false, false)) {
                    LOGGER.info("Failed to claim plot {}", plot.getId().toCommaSeparatedString());
                    player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
                    plot.setOwnerAbs(null);
                } else if (area.isAutoMerge()) {
                    PlotMergeEvent mergeEvent = Claim.this.eventDispatcher.callMerge(plot, Direction.ALL, Integer.MAX_VALUE, player);
                    if (mergeEvent.getEventResult() == Result.DENY) {
                        player.sendMessage(TranslatableCaption.of("events.event_denied"), Template.of("value", "Auto merge on claim"));
                    } else {
                        if (plot.getPlotModificationManager().autoMerge(mergeEvent.getDir(), mergeEvent.getMax(), player.getUUID(), player, true)) {
                            eventDispatcher.callPostMerge(player, plot);
                        }
                    }
                }
                return null;
            });
        } catch (final Exception e) {
            e.printStackTrace();
        }
    }, () -> {
        LOGGER.info("Failed to add plot to database: {}", plot.getId().toCommaSeparatedString());
        player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
        plot.setOwnerAbs(null);
    });
    return true;
}
Also used : PlotArea(com.plotsquared.core.plot.PlotArea) Plot(com.plotsquared.core.plot.Plot) PlotExpression(com.plotsquared.core.util.PlotExpression) PlayerClaimPlotEvent(com.plotsquared.core.events.PlayerClaimPlotEvent) PlotMergeEvent(com.plotsquared.core.events.PlotMergeEvent) Location(com.plotsquared.core.location.Location)

Example 5 with PlotExpression

use of com.plotsquared.core.util.PlotExpression in project PlotSquared by IntellectualSites.

the class Auto method onCommand.

@Override
public boolean onCommand(final PlotPlayer<?> player, String[] args) {
    PlotArea plotarea = player.getApplicablePlotArea();
    if (plotarea == null) {
        final PermissionHandler permissionHandler = PlotSquared.platform().permissionHandler();
        if (permissionHandler.hasCapability(PermissionHandler.PermissionHandlerCapability.PER_WORLD_PERMISSIONS)) {
            for (final PlotArea area : this.plotAreaManager.getAllPlotAreas()) {
                if (player.hasPermission(area.getWorldName(), "plots.auto")) {
                    if (plotarea != null) {
                        plotarea = null;
                        break;
                    }
                    plotarea = area;
                }
            }
        }
        if (this.plotAreaManager.getAllPlotAreas().length == 1) {
            plotarea = this.plotAreaManager.getAllPlotAreas()[0];
        }
        if (plotarea == null) {
            player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world"));
            return false;
        }
    }
    int sizeX = 1;
    int sizeZ = 1;
    String schematic = null;
    boolean mega = false;
    if (args.length > 0) {
        try {
            String[] split = args[0].split("[,;]");
            if (split.length == 2) {
                sizeX = Integer.parseInt(split[0]);
                sizeZ = Integer.parseInt(split[1]);
            } else {
                player.sendMessage(TranslatableCaption.of("commandconfig.command_syntax"), Template.of("value", getUsage()));
                return true;
            }
            if (sizeX < 1 || sizeZ < 1) {
                player.sendMessage(TranslatableCaption.of("error.plot_size_negative"));
                return true;
            }
            if (args.length > 1) {
                schematic = args[1];
            }
            mega = true;
        } catch (NumberFormatException ignored) {
            sizeX = 1;
            sizeZ = 1;
            schematic = args[0];
        }
    }
    PlayerAutoPlotEvent event = this.eventDispatcher.callAuto(player, plotarea, schematic, sizeX, sizeZ);
    if (event.getEventResult() == Result.DENY) {
        player.sendMessage(TranslatableCaption.of("events.event_denied"), Template.of("value", "Auto claim"));
        return true;
    }
    boolean force = event.getEventResult() == Result.FORCE;
    sizeX = event.getSizeX();
    sizeZ = event.getSizeZ();
    schematic = event.getSchematic();
    if (!force && mega && !Permissions.hasPermission(player, Permission.PERMISSION_AUTO_MEGA)) {
        player.sendMessage(TranslatableCaption.of("permission.no_permission"), Template.of("node", String.valueOf(Permission.PERMISSION_AUTO_MEGA)));
    }
    if (!force && sizeX * sizeZ > Settings.Claim.MAX_AUTO_AREA) {
        player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots_num"), Template.of("amount", String.valueOf(Settings.Claim.MAX_AUTO_AREA)));
        return false;
    }
    final int allowed_plots = player.getAllowedPlots();
    try (final MetaDataAccess<Boolean> metaDataAccess = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_AUTO)) {
        if (!force && (metaDataAccess.get().orElse(false) || !checkAllowedPlots(player, plotarea, allowed_plots, sizeX, sizeZ))) {
            return false;
        }
    }
    if (schematic != null && !schematic.isEmpty()) {
        if (!plotarea.hasSchematic(schematic)) {
            player.sendMessage(TranslatableCaption.of("schematics.schematic_invalid_named"), Template.of("schemname", schematic), Template.of("reason", "non-existent"));
            return true;
        }
        if (!force && !Permissions.hasPermission(player, Permission.PERMISSION_CLAIM_SCHEMATIC.format(schematic)) && !Permissions.hasPermission(player, "plots.admin.command.schematic")) {
            player.sendMessage(TranslatableCaption.of("permission.no_permission"), Template.of("node", "plots.claim.%s0"));
            return true;
        }
    }
    if (this.econHandler != null && plotarea.useEconomy()) {
        PlotExpression costExp = plotarea.getPrices().get("claim");
        double cost = costExp.evaluate(Settings.Limit.GLOBAL ? player.getPlotCount() : player.getPlotCount(plotarea.getWorldName()));
        cost = (sizeX * sizeZ) * cost;
        if (cost > 0d) {
            if (!this.econHandler.isSupported()) {
                player.sendMessage(TranslatableCaption.of("economy.vault_or_consumer_null"));
                return false;
            }
            if (!force && this.econHandler.getMoney(player) < cost) {
                player.sendMessage(TranslatableCaption.of("economy.cannot_afford_plot"), Template.of("money", this.econHandler.format(cost)), Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))));
                return false;
            }
            this.econHandler.withdrawMoney(player, cost);
            player.sendMessage(TranslatableCaption.of("economy.removed_balance"), Template.of("money", this.econHandler.format(cost)));
        }
    }
    List<Plot> plots = this.servicePipeline.pump(new AutoService.AutoQuery(player, null, sizeX, sizeZ, plotarea)).through(AutoService.class).getResult();
    plots = this.eventDispatcher.callAutoPlotsChosen(player, plots).getPlots();
    if (plots.isEmpty()) {
        player.sendMessage(TranslatableCaption.of("errors.no_free_plots"));
        return false;
    } else if (plots.size() == 1) {
        this.claimSingle(player, plots.get(0), plotarea, schematic);
    } else {
        final Iterator<Plot> plotIterator = plots.iterator();
        while (plotIterator.hasNext()) {
            Plot plot = plotIterator.next();
            if (!plot.canClaim(player)) {
                continue;
            }
            plot.claim(player, !plotIterator.hasNext(), null, true, true);
            eventDispatcher.callPostAuto(player, plot);
        }
        final PlotAutoMergeEvent mergeEvent = this.eventDispatcher.callAutoMerge(plots.get(0), plots.stream().map(Plot::getId).collect(Collectors.toList()));
        if (!force && mergeEvent.getEventResult() == Result.DENY) {
            player.sendMessage(TranslatableCaption.of("events.event_denied"), Template.of("value", "Auto merge"));
            return false;
        }
        return plotarea.mergePlots(mergeEvent.getPlots(), true);
    }
    return true;
}
Also used : PlotArea(com.plotsquared.core.plot.PlotArea) PermissionHandler(com.plotsquared.core.permissions.PermissionHandler) AutoService(com.plotsquared.core.services.plots.AutoService) Plot(com.plotsquared.core.plot.Plot) PlayerAutoPlotEvent(com.plotsquared.core.events.PlayerAutoPlotEvent) PlotExpression(com.plotsquared.core.util.PlotExpression) PlotAutoMergeEvent(com.plotsquared.core.events.PlotAutoMergeEvent) Iterator(java.util.Iterator)

Aggregations

PlotArea (com.plotsquared.core.plot.PlotArea)5 PlotExpression (com.plotsquared.core.util.PlotExpression)5 Plot (com.plotsquared.core.plot.Plot)4 Location (com.plotsquared.core.location.Location)3 SinglePlotArea (com.plotsquared.core.plot.world.SinglePlotArea)2 EconHandler (com.plotsquared.core.util.EconHandler)2 Inject (com.google.inject.Inject)1 Settings (com.plotsquared.core.configuration.Settings)1 TranslatableCaption (com.plotsquared.core.configuration.caption.TranslatableCaption)1 PlayerAutoPlotEvent (com.plotsquared.core.events.PlayerAutoPlotEvent)1 PlayerClaimPlotEvent (com.plotsquared.core.events.PlayerClaimPlotEvent)1 PlotAutoMergeEvent (com.plotsquared.core.events.PlotAutoMergeEvent)1 PlotMergeEvent (com.plotsquared.core.events.PlotMergeEvent)1 Result (com.plotsquared.core.events.Result)1 TeleportCause (com.plotsquared.core.events.TeleportCause)1 Permission (com.plotsquared.core.permissions.Permission)1 PermissionHandler (com.plotsquared.core.permissions.PermissionHandler)1 ConsolePlayer (com.plotsquared.core.player.ConsolePlayer)1 PlotPlayer (com.plotsquared.core.player.PlotPlayer)1 AutoService (com.plotsquared.core.services.plots.AutoService)1