Fix target command

Threw an exception when you didnt pass an argument
This commit is contained in:
manuelgu 2016-03-30 14:43:04 +02:00
parent 510b9a47dc
commit 429fed2ab3

View File

@ -7,6 +7,7 @@ import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.StringMan;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
@ -18,6 +19,10 @@ import com.plotsquared.general.commands.CommandDeclaration;
category = CommandCategory.INFO)
public class Target extends SubCommand {
public Target() {
super(Argument.PlotID);
}
@Override
public boolean onCommand(PlotPlayer plr, String[] args) {
Location plrLocation = plr.getLocation();