mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Fixed no argument feedback for move/copy/swap
This commit is contained in:
		@@ -54,13 +54,17 @@ public class Copy extends SubCommand {
 | 
			
		||||
            MainUtil.sendMessage(plr, C.NO_PLOT_PERMS);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        if (args.length != 1) {
 | 
			
		||||
            C.COMMAND_SYNTAX.send(plr, getUsage());
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final Plot plot2 = MainUtil.getPlotFromString(plr, args[0], true);
 | 
			
		||||
        if ((plot2 == null)) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        if (plot1.equals(plot2)) {
 | 
			
		||||
            MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_ID);
 | 
			
		||||
            MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, "/plot copy <X;Z>");
 | 
			
		||||
            C.COMMAND_SYNTAX.send(plr, getUsage());
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        if (!plot1.getWorld().equals(plot2.getWorld())) {
 | 
			
		||||
 
 | 
			
		||||
@@ -20,19 +20,23 @@
 | 
			
		||||
////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
package com.intellectualcrafters.plot.commands;
 | 
			
		||||
 | 
			
		||||
import com.intellectualcrafters.plot.PS;
 | 
			
		||||
import com.intellectualcrafters.plot.config.C;
 | 
			
		||||
import com.intellectualcrafters.plot.object.Location;
 | 
			
		||||
import com.intellectualcrafters.plot.object.Plot;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotId;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotPlayer;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotWorld;
 | 
			
		||||
import com.intellectualcrafters.plot.util.MainUtil;
 | 
			
		||||
import com.intellectualcrafters.plot.util.Permissions;
 | 
			
		||||
import com.plotsquared.general.commands.Argument;
 | 
			
		||||
import com.plotsquared.general.commands.CommandDeclaration;
 | 
			
		||||
 | 
			
		||||
@CommandDeclaration(command = "move", description = "Move a plot", aliases = { "debugmove" }, permission = "plots.move", category = CommandCategory.ACTIONS, requiredType = RequiredType.NONE)
 | 
			
		||||
@CommandDeclaration(
 | 
			
		||||
usage = "/plot move <X;Z>",
 | 
			
		||||
command = "move",
 | 
			
		||||
description = "Move a plot",
 | 
			
		||||
aliases = { "debugmove" },
 | 
			
		||||
permission = "plots.move",
 | 
			
		||||
category = CommandCategory.ACTIONS,
 | 
			
		||||
requiredType = RequiredType.NONE)
 | 
			
		||||
public class Move extends SubCommand {
 | 
			
		||||
    
 | 
			
		||||
    public Move() {
 | 
			
		||||
@@ -50,6 +54,10 @@ public class Move extends SubCommand {
 | 
			
		||||
            MainUtil.sendMessage(plr, C.NO_PLOT_PERMS);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        if (args.length != 1) {
 | 
			
		||||
            C.COMMAND_SYNTAX.send(plr, getUsage());
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final Plot plot2 = MainUtil.getPlotFromString(plr, args[0], true);
 | 
			
		||||
        if ((plot2 == null)) {
 | 
			
		||||
            return false;
 | 
			
		||||
 
 | 
			
		||||
@@ -20,22 +20,15 @@
 | 
			
		||||
////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
package com.intellectualcrafters.plot.commands;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
import com.intellectualcrafters.plot.config.C;
 | 
			
		||||
import com.intellectualcrafters.plot.object.Location;
 | 
			
		||||
import com.intellectualcrafters.plot.object.Plot;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotCluster;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotClusterId;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotId;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotPlayer;
 | 
			
		||||
import com.intellectualcrafters.plot.util.ChunkManager;
 | 
			
		||||
import com.intellectualcrafters.plot.util.ClusterManager;
 | 
			
		||||
import com.intellectualcrafters.plot.util.MainUtil;
 | 
			
		||||
import com.intellectualcrafters.plot.util.Permissions;
 | 
			
		||||
import com.plotsquared.general.commands.CommandDeclaration;
 | 
			
		||||
 | 
			
		||||
@CommandDeclaration(command = "swap", description = "Swap two plots", aliases = { "switch" }, category = CommandCategory.ACTIONS, requiredType = RequiredType.NONE)
 | 
			
		||||
@CommandDeclaration(usage = "/plot swap <X;Z>", command = "swap", description = "Swap two plots", aliases = { "switch" }, category = CommandCategory.ACTIONS, requiredType = RequiredType.NONE)
 | 
			
		||||
public class Swap extends SubCommand {
 | 
			
		||||
    
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -49,6 +42,10 @@ public class Swap extends SubCommand {
 | 
			
		||||
            MainUtil.sendMessage(plr, C.NO_PLOT_PERMS);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        if (args.length != 1) {
 | 
			
		||||
            C.COMMAND_SYNTAX.send(plr, getUsage());
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final Plot plot2 = MainUtil.getPlotFromString(plr, args[0], true);
 | 
			
		||||
        if ((plot2 == null)) {
 | 
			
		||||
            return false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user