Even more TL. Fixes command description issues.
This commit is contained in:
@@ -5,6 +5,7 @@ import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -35,7 +36,7 @@ public class CmdShow extends FCommand {
|
||||
|
||||
}
|
||||
|
||||
if (!payForCommand(Conf.econCostShow, "to show faction information", "for showing faction information")) {
|
||||
if (!payForCommand(Conf.econCostShow, TL.COMMAND_SHOW_TOSHOW, TL.COMMAND_SHOW_FORSHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,24 +45,24 @@ public class CmdShow extends FCommand {
|
||||
Collection<FPlayer> normals = faction.getFPlayersWhereRole(Role.NORMAL);
|
||||
|
||||
msg((p).txt.titleize(faction.getTag(this.fme)));
|
||||
msg("<a>Description: <i>%s", faction.getDescription());
|
||||
msg(TL.COMMAND_SHOW_DESCRIPTION, faction.getDescription());
|
||||
if (!faction.isNormal()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String peaceStatus = "";
|
||||
if (faction.isPeaceful()) {
|
||||
peaceStatus = " " + Conf.colorNeutral + "This faction is Peaceful";
|
||||
peaceStatus = " " + Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString();
|
||||
}
|
||||
|
||||
msg("<a>Joining: <i>" + (faction.getOpen() ? "no invitation is needed" : "invitation is required") + peaceStatus);
|
||||
msg(TL.COMMAND_SHOW_JOINING.toString() + peaceStatus, (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString()));
|
||||
|
||||
double powerBoost = faction.getPowerBoost();
|
||||
String boost = (powerBoost > 0.0D ? " (bonus: " : " (penalty: ") + powerBoost + ")";
|
||||
msg("<a>Land / Power / Maxpower: <i> %d/%d/%d %s", faction.getLandRounded(), faction.getPowerRounded(), faction.getPowerMaxRounded(), boost);
|
||||
String boost = (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString():TL.COMMAND_SHOW_PENALTY.toString() + powerBoost + ")");
|
||||
msg(TL.COMMAND_SHOW_POWER, faction.getLandRounded(), faction.getPowerRounded(), faction.getPowerMaxRounded(), boost);
|
||||
|
||||
if (faction.isPermanent()) {
|
||||
msg("<a>This faction is permanent, remaining even with no members.");
|
||||
msg(TL.COMMAND_SHOW_PERMANENT);
|
||||
}
|
||||
|
||||
if (Econ.shouldBeUsed()) {
|
||||
@@ -69,18 +70,18 @@ public class CmdShow extends FCommand {
|
||||
double refund = value * Conf.econClaimRefundMultiplier;
|
||||
if (value > 0.0D) {
|
||||
String stringValue = Econ.moneyString(value);
|
||||
String stringRefund = refund > 0.0D ? " (" + Econ.moneyString(refund) + " depreciated)" : "";
|
||||
msg("<a>Total land value: <i>" + stringValue + stringRefund);
|
||||
String stringRefund = (refund > 0.0) ? (TL.COMMAND_SHOW_DEPRECIATED.format(Econ.moneyString(refund))) : "";
|
||||
msg(TL.COMMAND_SHOW_LANDVALUE, stringValue, stringRefund);
|
||||
}
|
||||
|
||||
if (Conf.bankEnabled) {
|
||||
msg("<a>Bank contains: <i>" + Econ.moneyString(Econ.getBalance(faction.getAccountId())));
|
||||
msg(TL.COMMAND_SHOW_BANKCONTAINS, Econ.moneyString(Econ.getBalance(faction.getAccountId())));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String allyList = p.txt.parse("<a>Allies: ");
|
||||
String enemyList = p.txt.parse("<a>Enemies: ");
|
||||
String allyList = p.txt.parse(TL.COMMAND_SHOW_ALLIES.toString());
|
||||
String enemyList = p.txt.parse(TL.COMMAND_SHOW_ENEMIES.toString());
|
||||
for (Faction otherFaction : Factions.getInstance().getAllFactions()) {
|
||||
if (otherFaction != faction) {
|
||||
Relation rel = otherFaction.getRelationTo(faction);
|
||||
@@ -104,8 +105,8 @@ public class CmdShow extends FCommand {
|
||||
sendMessage(allyList);
|
||||
sendMessage(enemyList);
|
||||
|
||||
String onlineList = p.txt.parse("<a>") + "Members online: ";
|
||||
String offlineList = p.txt.parse("<a>") + "Members offline: ";
|
||||
String onlineList = p.txt.parse("<a>") + TL.COMMAND_SHOW_MEMBERSONLINE.toString();
|
||||
String offlineList = p.txt.parse("<a>") + TL.COMMAND_SHOW_MEMBERSOFFLINE.toString();
|
||||
for (FPlayer follower : admins) {
|
||||
String listpart = follower.getNameAndTitle(this.fme) + p.txt.parse("<i>") + ", ";
|
||||
if (follower.isOnlineAndVisibleTo(this.me)) {
|
||||
@@ -143,4 +144,9 @@ public class CmdShow extends FCommand {
|
||||
sendMessage(onlineList);
|
||||
sendMessage(offlineList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_SHOW_COMMANDDESCRIPTION;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user