Factions/src/org/mcteam/factions/commands/FCommandUnclaimall.java

39 lines
804 B
Java
Raw Normal View History

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";
}
@Override
2011-04-08 16:22:00 +02:00
public void perform() {
if ( ! assertHasFaction()) {
return;
}
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.");
}
}