weekly code cleanup

This commit is contained in:
boy0001 2014-11-05 14:42:08 +11:00
parent aaa5d54085
commit bddaadd31d
154 changed files with 17956 additions and 17295 deletions

View file

@ -2,7 +2,7 @@
* Copyright (c) IntellectualCrafters - 2014. You are not allowed to distribute
* and/or monetize any of our intellectual property. IntellectualCrafters is not
* affiliated with Mojang AB. Minecraft is a trademark of Mojang AB.
*
*
* >> File = Clear.java >> Generated by: Citymonstret at 2014-08-09 01:41
*/
@ -20,30 +20,29 @@ import com.intellectualcrafters.plot.PlotMain;
*/
public class Clear extends SubCommand {
public Clear() {
super(Command.CLEAR, "Clear a plot", "clear", CommandCategory.ACTIONS, true);
// TODO console clear plot at location
}
public Clear() {
super(Command.CLEAR, "Clear a plot", "clear", CommandCategory.ACTIONS, true);
@Override
public boolean execute(Player plr, String... args) {
if (!PlayerFunctions.isInPlot(plr)) {
PlayerFunctions.sendMessage(plr, "You're not in a plot.");
return false;
}
Plot plot = PlayerFunctions.getCurrentPlot(plr);
if (!PlayerFunctions.getTopPlot(plr.getWorld(), plot).equals(PlayerFunctions.getBottomPlot(plr.getWorld(), plot))) {
// TODO console clear plot at location
}
@Override
public boolean execute(final Player plr, final String... args) {
if (!PlayerFunctions.isInPlot(plr)) {
PlayerFunctions.sendMessage(plr, "You're not in a plot.");
return false;
}
final Plot plot = PlayerFunctions.getCurrentPlot(plr);
if (!PlayerFunctions.getTopPlot(plr.getWorld(), plot).equals(PlayerFunctions.getBottomPlot(plr.getWorld(), plot))) {
PlayerFunctions.sendMessage(plr, C.UNLINK_REQUIRED);
return false;
}
if (((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(plr.getUniqueId()))
&& !PlotMain.hasPermission(plr,"plots.admin")) {
PlayerFunctions.sendMessage(plr, C.NO_PLOT_PERMS);
return false;
}
plot.clear(plr);
return true;
}
if (((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(plr.getUniqueId())) && !PlotMain.hasPermission(plr, "plots.admin")) {
PlayerFunctions.sendMessage(plr, C.NO_PLOT_PERMS);
return false;
}
plot.clear(plr);
return true;
}
}