Merge pull request #1019 from manuelgu/master

Fixes #1018
This commit is contained in:
Matt 2016-03-28 18:17:45 -04:00
commit 874da8c5bc
3 changed files with 9 additions and 5 deletions

View File

@ -31,7 +31,6 @@ import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.UUID;
@CommandDeclaration(
@ -50,6 +49,10 @@ public class Add extends SubCommand {
@Override
public boolean onCommand(PlotPlayer plr, String[] args) {
if (args.length != 1) {
MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, this.getUsage());
return true;
}
Location loc = plr.getLocation();
Plot plot = loc.getPlotAbs();
if (plot == null) {

View File

@ -29,7 +29,6 @@ import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
@ -51,7 +50,7 @@ public class Remove extends SubCommand {
@Override
public boolean onCommand(PlotPlayer plr, String[] args) {
if (args.length != 1) {
MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, "/plot remove <player>");
MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, this.getUsage());
return true;
}
Location loc = plr.getLocation();

View File

@ -31,7 +31,6 @@ import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.UUID;
@CommandDeclaration(
@ -49,7 +48,10 @@ public class Trust extends SubCommand {
@Override
public boolean onCommand(PlotPlayer plr, String[] args) {
if (args.length != 1) {
MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, this.getUsage());
return true;
}
Location loc = plr.getLocation();
Plot plot = loc.getPlotAbs();
if (plot == null) {