2011-04-08 16:22:00 +02:00
|
|
|
package org.mcteam.factions.commands;
|
|
|
|
|
|
|
|
import org.mcteam.factions.Board;
|
|
|
|
import org.mcteam.factions.Conf;
|
|
|
|
import org.mcteam.factions.Faction;
|
|
|
|
import org.mcteam.factions.struct.Role;
|
|
|
|
|
|
|
|
public class FCommandUnclaimall extends FBaseCommand {
|
|
|
|
|
|
|
|
public FCommandUnclaimall() {
|
|
|
|
aliases.add("unclaimall");
|
|
|
|
aliases.add("declaimall");
|
|
|
|
|
|
|
|
helpDescription = "Unclaim all of your factions land";
|
|
|
|
}
|
|
|
|
|
|
|
|
public void perform() {
|
|
|
|
if ( ! assertHasFaction()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-05-08 17:16:43 +02:00
|
|
|
if( isLocked() ) {
|
|
|
|
sendLockMessage();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-04-08 16:22:00 +02:00
|
|
|
if ( ! assertMinRole(Role.MODERATOR)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Faction myFaction = me.getFaction();
|
|
|
|
|
|
|
|
Board.unclaimAll(myFaction.getId());
|
|
|
|
myFaction.sendMessage(me.getNameAndRelevant(myFaction)+Conf.colorSystem+" unclaimed ALL of your factions land.");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|