More changes

This commit is contained in:
boy0001 2015-02-19 19:51:10 +11:00
parent d227bcc739
commit fde378c965
96 changed files with 3323 additions and 1354 deletions

View file

@ -24,7 +24,7 @@ package com.intellectualcrafters.plot.commands;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.intellectualcrafters.plot.PlotMain;
import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
@ -43,22 +43,22 @@ public class Clear extends SubCommand {
if (plr == null) {
// Is console
if (args.length < 2) {
PlotMain.sendConsoleSenderMessage("You need to specify two arguments: ID (0;0) & World (world)");
PlotSquared.sendConsoleSenderMessage("You need to specify two arguments: ID (0;0) & World (world)");
} else {
final PlotId id = PlotId.fromString(args[0]);
final String world = args[1];
if (id == null) {
PlotMain.sendConsoleSenderMessage("Invalid Plot ID: " + args[0]);
PlotSquared.sendConsoleSenderMessage("Invalid Plot ID: " + args[0]);
} else {
if (!PlotMain.isPlotWorld(world)) {
PlotMain.sendConsoleSenderMessage("Invalid plot world: " + world);
if (!PlotSquared.isPlotWorld(world)) {
PlotSquared.sendConsoleSenderMessage("Invalid plot world: " + world);
} else {
final Plot plot = PlotHelper.getPlot(Bukkit.getWorld(world), id);
if (plot == null) {
PlotMain.sendConsoleSenderMessage("Could not find plot " + args[0] + " in world " + world);
PlotSquared.sendConsoleSenderMessage("Could not find plot " + args[0] + " in world " + world);
} else {
plot.clear(null, false);
PlotMain.sendConsoleSenderMessage("Plot " + plot.getId().toString() + " cleared.");
PlotSquared.sendConsoleSenderMessage("Plot " + plot.getId().toString() + " cleared.");
}
}
}
@ -73,7 +73,7 @@ public class Clear extends SubCommand {
if (!PlayerFunctions.getTopPlot(plr.getWorld(), plot).equals(PlayerFunctions.getBottomPlot(plr.getWorld(), plot))) {
return sendMessage(plr, C.UNLINK_REQUIRED);
}
if (((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(UUIDHandler.getUUID(plr))) && !PlotMain.hasPermission(plr, "plots.admin.command.clear")) {
if (((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(UUIDHandler.getUUID(plr))) && !PlotSquared.hasPermission(plr, "plots.admin.command.clear")) {
return sendMessage(plr, C.NO_PLOT_PERMS);
}
assert plot != null;