Reformat.

This commit is contained in:
drtshock 2014-12-17 20:15:11 -06:00
parent 59be72aefe
commit 73e92b8341
167 changed files with 3705 additions and 5553 deletions

View file

@ -21,9 +21,6 @@
package com.intellectualcrafters.plot.commands;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.intellectualcrafters.plot.PlotMain;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Plot;
@ -31,6 +28,8 @@ import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.util.PlayerFunctions;
import com.intellectualcrafters.plot.util.PlotHelper;
import com.intellectualcrafters.plot.util.UUIDHandler;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class Clear extends SubCommand {
@ -44,23 +43,19 @@ public class Clear extends SubCommand {
// Is console
if (args.length < 2) {
PlotMain.sendConsoleSenderMessage("You need to specify two arguments: ID (0;0) & World (world)");
}
else {
} else {
final PlotId id = PlotId.fromString(args[0]);
final String world = args[1];
if (id == null) {
PlotMain.sendConsoleSenderMessage("Invalid Plot ID: " + args[0]);
}
else {
} else {
if (!PlotMain.isPlotWorld(world)) {
PlotMain.sendConsoleSenderMessage("Invalid plot world: " + world);
}
else {
} else {
final Plot plot = PlotHelper.getPlot(Bukkit.getWorld(world), id);
if (plot == null) {
PlotMain.sendConsoleSenderMessage("Could not find plot " + args[0] + " in world " + world);
}
else {
} else {
plot.clear(null, false);
PlotMain.sendConsoleSenderMessage("Plot " + plot.getId().toString() + " cleared.");
}