Add TL for commands. Resolves #162. Supercedes #97.

This commit is contained in:
korikisulda
2014-12-07 23:12:52 +00:00
committed by drtshock
parent bd8f572cbf
commit 1230803cfb
64 changed files with 864 additions and 318 deletions

View File

@@ -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() + ".");
}
}