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

@@ -6,6 +6,7 @@ import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.util.TL;
public class CmdSethome extends FCommand {
@@ -27,7 +28,7 @@ public class CmdSethome extends FCommand {
@Override
public void perform() {
if (!Conf.homesEnabled) {
fme.msg("<b>Sorry, Faction homes are disabled on this server.");
fme.msg(TL.COMMAND_SETHOME_DISABLED);
return;
}
@@ -51,21 +52,21 @@ public class CmdSethome extends FCommand {
if (!Permission.BYPASS.has(me) &&
Conf.homesMustBeInClaimedTerritory &&
Board.getInstance().getFactionAt(new FLocation(me)) != faction) {
fme.msg("<b>Sorry, your faction home can only be set inside your own claimed territory.");
fme.msg(TL.COMMAND_SETHOME_NOTCLAIMED);
return;
}
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (!payForCommand(Conf.econCostSethome, "to set the faction home", "for setting the faction home")) {
if (!payForCommand(Conf.econCostSethome, TL.COMMAND_SETHOME_TOSET, TL.COMMAND_SETHOME_FORSET)) {
return;
}
faction.setHome(me.getLocation());
faction.msg("%s<i> set the home for your faction. You can now use:", fme.describeTo(myFaction, true));
faction.msg(TL.COMMAND_SETHOME_SET, fme.describeTo(myFaction, true));
faction.sendMessage(p.cmdBase.cmdHome.getUseageTemplate());
if (faction != myFaction) {
fme.msg("<b>You have set the home for the " + faction.getTag(fme) + "<i> faction.");
fme.msg(TL.COMMAND_SETHOME_SETOTHER,faction.getTag(fme));
}
}