From 3852df4fd2ce5d7bed984957b0cc89f602364758 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sun, 22 Feb 2015 17:10:22 +1100 Subject: [PATCH] copy --- .../plot/commands/Copy.java | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java deleted file mode 100644 index 2a13db78a..000000000 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java +++ /dev/null @@ -1,60 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////////////////////////// -// PlotSquared - A plot manager and world generator for the Bukkit API / -// Copyright (c) 2014 IntellectualSites/IntellectualCrafters / -// / -// This program is free software; you can redistribute it and/or modify / -// it under the terms of the GNU General Public License as published by / -// the Free Software Foundation; either version 3 of the License, or / -// (at your option) any later version. / -// / -// This program is distributed in the hope that it will be useful, / -// but WITHOUT ANY WARRANTY; without even the implied warranty of / -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / -// GNU General Public License for more details. / -// / -// You should have received a copy of the GNU General Public License / -// along with this program; if not, write to the Free Software Foundation, / -// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA / -// / -// You can contact us via: support@intellectualsites.com / -//////////////////////////////////////////////////////////////////////////////////////////////////// -package com.intellectualcrafters.plot.commands; - -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; -import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; - -public class Copy extends SubCommand { - public Copy() { - super(Command.COPY, "Copy a plot", "copy", CommandCategory.ACTIONS, true); - } - - @Override - public boolean execute(final PlotPlayer plr, final String... args) { - if (!BukkitPlayerFunctions.isInPlot(plr)) { - MainUtil.sendMessage(plr, C.NOT_IN_PLOT); - return false; - } - final Plot plot = MainUtil.getPlot(loc); - if (((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(UUIDHandler.getUUID(plr))) && !Permissions.hasPermission(plr, "plots.admin.command.copy")) { - MainUtil.sendMessage(plr, C.NO_PLOT_PERMS); - return false; - } - assert plot != null; - if (plot.settings.isMerged()) { - MainUtil.sendMessage(plr, C.UNLINK_REQUIRED); - return false; - } - final int size = (MainUtil.getPlotTopLocAbs(plr.getWorld(), plot.getId()).getBlockX() - MainUtil.getPlotBottomLocAbs(plr.getWorld(), plot.getId()).getBlockX()); - final PlotSelection selection = new PlotSelection(size, plr.getWorld(), plot); - if (PlotSelection.currentSelection.containsKey(plr.getName())) { - PlotSelection.currentSelection.remove(plr.getName()); - } - PlotSelection.currentSelection.put(plr.getName(), selection); - sendMessage(plr, C.CLIPBOARD_SET); - return true; - } -}