@@ -7,6 +7,8 @@ import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.scoreboards.FTeamWrapper;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
|
||||
@@ -49,11 +51,11 @@ public class CmdDisband extends FCommand {
|
||||
}
|
||||
|
||||
if (!faction.isNormal()) {
|
||||
msg("<i>You cannot disband the Wilderness, SafeZone, or WarZone.");
|
||||
msg(TL.COMMAND_DISBAND_IMMUTABLE.toString());
|
||||
return;
|
||||
}
|
||||
if (faction.isPermanent()) {
|
||||
msg("<i>This faction is designated as permanent, so you cannot disband it.");
|
||||
msg(TL.COMMAND_DISBAND_MARKEDPERMANENT.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,14 +72,15 @@ public class CmdDisband extends FCommand {
|
||||
|
||||
// Inform all players
|
||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
||||
String who = senderIsConsole ? "A server admin" : fme.describeTo(fplayer);
|
||||
String who = senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fplayer);
|
||||
if (fplayer.getFaction() == faction) {
|
||||
fplayer.msg("<h>%s<i> disbanded your faction.", who);
|
||||
fplayer.msg(TL.COMMAND_DISBAND_BROADCAST_YOURS, who);
|
||||
} else {
|
||||
fplayer.msg("<h>%s<i> disbanded the faction %s.", who, faction.getTag(fplayer));
|
||||
fplayer.msg(TL.COMMAND_DISBAND_BROADCAST_NOTYOURS, who, faction.getTag(fplayer));
|
||||
}
|
||||
}
|
||||
if (Conf.logFactionDisband) {
|
||||
//TODO: Format this correctly and translate.
|
||||
P.p.log("The faction " + faction.getTag() + " (" + faction.getId() + ") was disbanded by " + (senderIsConsole ? "console command" : fme.getName()) + ".");
|
||||
}
|
||||
|
||||
@@ -88,7 +91,8 @@ public class CmdDisband extends FCommand {
|
||||
|
||||
if (amount > 0.0) {
|
||||
String amountString = Econ.moneyString(amount);
|
||||
msg("<i>You have been given the disbanded faction's bank, totaling %s.", amountString);
|
||||
msg(TL.COMMAND_DISBAND_HOLDINGS, amountString);
|
||||
//TODO: Format this correctly and translate
|
||||
P.p.log(fme.getName() + " has been given bank holdings of " + amountString + " from disbanding " + faction.getTag() + ".");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user