Reformat.
This commit is contained in:
@@ -7,7 +7,6 @@ import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdAdmin extends FCommand {
|
||||
|
||||
@@ -39,6 +39,6 @@ public class CmdBoom extends FCommand {
|
||||
String enabled = myFaction.noExplosionsInTerritory() ? TL.GENERIC_DISABLED.toString() : TL.GENERIC_ENABLED.toString();
|
||||
|
||||
// Inform
|
||||
myFaction.msg(TL.COMMAND_BOOM_ENABLED, fme.describeTo(myFaction),enabled);
|
||||
myFaction.msg(TL.COMMAND_BOOM_ENABLED, fme.describeTo(myFaction), enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -143,7 +142,7 @@ public class CmdConfig extends FCommand {
|
||||
|
||||
}
|
||||
if (newColor == null) {
|
||||
sendMessage(TL.COMMAND_CONFIG_INVALID_COLOUR.format(fieldName,value.toUpperCase()));
|
||||
sendMessage(TL.COMMAND_CONFIG_INVALID_COLOUR.format(fieldName, value.toUpperCase()));
|
||||
return;
|
||||
}
|
||||
target.set(null, newColor);
|
||||
@@ -170,7 +169,7 @@ public class CmdConfig extends FCommand {
|
||||
|
||||
}
|
||||
if (newMat == null) {
|
||||
sendMessage(TL.COMMAND_CONFIG_INVALID_MATERIAL.format(fieldName,value.toUpperCase()));
|
||||
sendMessage(TL.COMMAND_CONFIG_INVALID_MATERIAL.format(fieldName, value.toUpperCase()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -180,13 +179,13 @@ public class CmdConfig extends FCommand {
|
||||
if (matSet.contains(newMat)) {
|
||||
matSet.remove(newMat);
|
||||
target.set(null, matSet);
|
||||
success = TL.COMMAND_CONFIG_MATERIAL_REMOVED.format(fieldName,value.toUpperCase());
|
||||
success = TL.COMMAND_CONFIG_MATERIAL_REMOVED.format(fieldName, value.toUpperCase());
|
||||
}
|
||||
// Material not present yet, add it
|
||||
else {
|
||||
matSet.add(newMat);
|
||||
target.set(null, matSet);
|
||||
success = TL.COMMAND_CONFIG_MATERIAL_ADDED.format(fieldName,value.toUpperCase());
|
||||
success = TL.COMMAND_CONFIG_MATERIAL_ADDED.format(fieldName, value.toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,13 +197,13 @@ public class CmdConfig extends FCommand {
|
||||
if (stringSet.contains(value)) {
|
||||
stringSet.remove(value);
|
||||
target.set(null, stringSet);
|
||||
success = TL.COMMAND_CONFIG_SET_REMOVED.format(fieldName,value);
|
||||
success = TL.COMMAND_CONFIG_SET_REMOVED.format(fieldName, value);
|
||||
}
|
||||
// String not present yet, add it
|
||||
else {
|
||||
stringSet.add(value);
|
||||
target.set(null, stringSet);
|
||||
success = TL.COMMAND_CONFIG_SET_ADDED.format(fieldName,value);
|
||||
success = TL.COMMAND_CONFIG_SET_ADDED.format(fieldName, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,21 +216,21 @@ public class CmdConfig extends FCommand {
|
||||
|
||||
// unknown type
|
||||
else {
|
||||
sendMessage(TL.COMMAND_CONFIG_ERROR_TYPE.format(fieldName,target.getClass().getName()));
|
||||
sendMessage(TL.COMMAND_CONFIG_ERROR_TYPE.format(fieldName, target.getClass().getName()));
|
||||
return;
|
||||
}
|
||||
} catch (NoSuchFieldException ex) {
|
||||
sendMessage(TL.COMMAND_CONFIG_ERROR_MATCHING.format(fieldName));
|
||||
return;
|
||||
} catch (IllegalAccessException ex) {
|
||||
sendMessage(TL.COMMAND_CONFIG_ERROR_SETTING.format(fieldName,value));
|
||||
sendMessage(TL.COMMAND_CONFIG_ERROR_SETTING.format(fieldName, value));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!success.isEmpty()) {
|
||||
if (sender instanceof Player) {
|
||||
sendMessage(success);
|
||||
P.p.log(success + TL.COMMAND_CONFIG_LOG.format((Player)sender));
|
||||
P.p.log(success + TL.COMMAND_CONFIG_LOG.format((Player) sender));
|
||||
} else // using P.p.log() instead of sendMessage if run from server console so that "[Factions v#.#.#]" is prepended in server log
|
||||
{
|
||||
P.p.log(success);
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Conf.Backend;
|
||||
import com.massivecraft.factions.zcore.persist.json.FactionsJSON;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public class CmdConvert extends FCommand {
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -4,9 +4,7 @@ import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdDeinvite extends FCommand {
|
||||
|
||||
@@ -8,7 +8,6 @@ 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;
|
||||
|
||||
|
||||
@@ -80,7 +79,7 @@ public class CmdDisband extends FCommand {
|
||||
}
|
||||
}
|
||||
if (Conf.logFactionDisband) {
|
||||
//TODO: Format this correctly and translate.
|
||||
//TODO: Format this correctly and translate.
|
||||
P.p.log("The faction " + faction.getTag() + " (" + faction.getId() + ") was disbanded by " + (senderIsConsole ? "console command" : fme.getName()) + ".");
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public class CmdHelp extends FCommand {
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_RELATIONS_5.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_RELATIONS_6.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_RELATIONS_7.toString()));
|
||||
pageLines.add(TL.COMMAND_HELP_RELATIONS_8.toString());
|
||||
pageLines.add(TL.COMMAND_HELP_RELATIONS_8.toString());
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_RELATIONS_9.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_RELATIONS_10.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_RELATIONS_11.toString()));
|
||||
@@ -149,7 +149,7 @@ public class CmdHelp extends FCommand {
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_PERMISSIONS_1.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_PERMISSIONS_2.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_PERMISSIONS_3.toString()));
|
||||
pageLines.add(TL.COMMAND_HELP_PERMISSIONS_4.toString());
|
||||
pageLines.add(TL.COMMAND_HELP_PERMISSIONS_4.toString());
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_PERMISSIONS_5.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_PERMISSIONS_6.toString()));
|
||||
pageLines.add(p.txt.parse(TL.COMMAND_HELP_PERMISSIONS_7.toString()));
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.SmokeUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -96,7 +95,7 @@ public class CmdHome extends FCommand {
|
||||
continue;
|
||||
}
|
||||
|
||||
fme.msg(TL.COMMAND_HOME_ENEMYNEAR,String.valueOf(Conf.homesTeleportAllowedEnemyDistance));
|
||||
fme.msg(TL.COMMAND_HOME_ENEMYNEAR, String.valueOf(Conf.homesTeleportAllowedEnemyDistance));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@ import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdInvite extends FCommand {
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdJoin extends FCommand {
|
||||
@@ -46,7 +45,7 @@ public class CmdJoin extends FCommand {
|
||||
}
|
||||
|
||||
if (faction == fplayer.getFaction()) {
|
||||
//TODO:TL
|
||||
//TODO:TL
|
||||
msg(TL.COMMAND_JOIN_ALREADYMEMBER, fplayer.describeTo(fme, true), (samePlayer ? "are" : "is"), faction.getTag(fme));
|
||||
return;
|
||||
}
|
||||
@@ -57,7 +56,7 @@ public class CmdJoin extends FCommand {
|
||||
}
|
||||
|
||||
if (fplayer.hasFaction()) {
|
||||
//TODO:TL
|
||||
//TODO:TL
|
||||
msg(TL.COMMAND_JOIN_INOTHERFACTION, fplayer.describeTo(fme, true), (samePlayer ? "your" : "their"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class CmdKick extends FCommand {
|
||||
}
|
||||
|
||||
if (Conf.logFactionKick) {
|
||||
//TODO:TL
|
||||
//TODO:TL
|
||||
P.p.log((senderIsConsole ? "A console command" : fme.getName()) + " kicked " + toKick.getName() + " from the faction: " + toKickFaction.getTag());
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -37,7 +35,7 @@ public class CmdList extends FCommand {
|
||||
@Override
|
||||
public void perform() {
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!payForCommand(Conf.econCostList, TL.COMMAND_LIST_TOLIST.toString() , TL.COMMAND_LIST_FORLIST.toString())) {
|
||||
if (!payForCommand(Conf.econCostList, TL.COMMAND_LIST_TOLIST.toString(), TL.COMMAND_LIST_FORLIST.toString())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CmdLock extends FCommand {
|
||||
@Override
|
||||
public void perform() {
|
||||
p.setLocked(this.argAsBool(0, !p.getLocked()));
|
||||
msg(p.getLocked()?TL.COMMAND_LOCK_LOCKED:TL.COMMAND_LOCK_UNLOCKED);
|
||||
msg(p.getLocked() ? TL.COMMAND_LOCK_LOCKED : TL.COMMAND_LOCK_UNLOCKED);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class CmdMap extends FCommand {
|
||||
}
|
||||
}
|
||||
|
||||
public void showMap() {
|
||||
public void showMap() {
|
||||
sendMessage(Board.getInstance().getMap(myFaction, new FLocation(fme), fme.getPlayer().getLocation().getYaw()));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdMod extends FCommand {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ public class CmdOwner extends FCommand {
|
||||
fme.msg(TL.COMMAND_OWNER_NOTCLAIMED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hasBypass) {
|
||||
|
||||
if (!hasBypass) {
|
||||
fme.msg(TL.COMMAND_OWNER_WRONGFACTION);
|
||||
return;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class CmdOwner extends FCommand {
|
||||
}
|
||||
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!payForCommand(Conf.econCostOwner, TL.COMMAND_OWNER_TOSET , TL.COMMAND_OWNER_FORSET)) {
|
||||
if (!payForCommand(Conf.econCostOwner, TL.COMMAND_OWNER_TOSET, TL.COMMAND_OWNER_FORSET)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class CmdPower extends FCommand {
|
||||
}
|
||||
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!payForCommand(Conf.econCostPower, TL.COMMAND_POWER_TOSHOW , TL.COMMAND_POWER_FORSHOW)) {
|
||||
if (!payForCommand(Conf.econCostPower, TL.COMMAND_POWER_TOSHOW, TL.COMMAND_POWER_FORSHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ public class CmdPowerBoost extends FCommand {
|
||||
target = TL.COMMAND_POWERBOOST_FACTION.format(targetFaction.getTag());
|
||||
}
|
||||
|
||||
msg(TL.COMMAND_POWERBOOST_BOOST,target,targetPower);
|
||||
msg(TL.COMMAND_POWERBOOST_BOOST, target, targetPower);
|
||||
if (!senderIsConsole) {
|
||||
P.p.log(TL.COMMAND_POWERBOOST_BOOSTLOG.toString(),fme.getName(),target,targetPower);
|
||||
P.p.log(TL.COMMAND_POWERBOOST_BOOSTLOG.toString(), fme.getName(), target, targetPower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,6 @@ public class CmdSetFWarp extends FCommand {
|
||||
}
|
||||
|
||||
private boolean transact(FPlayer player) {
|
||||
return !P.p.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(P.p.getConfig().getDouble("warp-cost.setwarp", 5), TL.COMMAND_SETFWARP_TOSET.toString() , TL.COMMAND_SETFWARP_FORSET.toString());
|
||||
return !P.p.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(P.p.getConfig().getDouble("warp-cost.setwarp", 5), TL.COMMAND_SETFWARP_TOSET.toString(), TL.COMMAND_SETFWARP_FORSET.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class CmdSethome extends FCommand {
|
||||
faction.msg(TL.COMMAND_SETHOME_SET, fme.describeTo(myFaction, true));
|
||||
faction.sendMessage(p.cmdBase.cmdHome.getUseageTemplate());
|
||||
if (faction != myFaction) {
|
||||
fme.msg(TL.COMMAND_SETHOME_SETOTHER,faction.getTag(fme));
|
||||
fme.msg(TL.COMMAND_SETHOME_SETOTHER, faction.getTag(fme));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,7 @@ import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdShowInvites extends FCommand {
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.apache.commons.lang.time.DurationFormatUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.scoreboards.FTeamWrapper;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -57,7 +56,7 @@ public class CmdTag extends FCommand {
|
||||
}
|
||||
|
||||
// then make 'em pay (if applicable)
|
||||
if (!payForCommand(Conf.econCostTag, TL.COMMAND_TAG_TOCHANGE,TL.COMMAND_TAG_FORCHANGE)) {
|
||||
if (!payForCommand(Conf.econCostTag, TL.COMMAND_TAG_TOCHANGE, TL.COMMAND_TAG_FORCHANGE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdUnclaim extends FCommand {
|
||||
@@ -38,7 +37,7 @@ public class CmdUnclaim extends FCommand {
|
||||
msg(TL.COMMAND_UNCLAIM_SAFEZONE_SUCCESS);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(),flocation.getCoordString(),otherFaction.getTag()));
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), flocation.getCoordString(), otherFaction.getTag()));
|
||||
}
|
||||
} else {
|
||||
msg(TL.COMMAND_UNCLAIM_SAFEZONE_NOPERM);
|
||||
@@ -50,7 +49,7 @@ public class CmdUnclaim extends FCommand {
|
||||
msg(TL.COMMAND_UNCLAIM_WARZONE_SUCCESS);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(),flocation.getCoordString(),otherFaction.getTag()));
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), flocation.getCoordString(), otherFaction.getTag()));
|
||||
}
|
||||
} else {
|
||||
msg(TL.COMMAND_UNCLAIM_WARZONE_NOPERM);
|
||||
@@ -65,7 +64,7 @@ public class CmdUnclaim extends FCommand {
|
||||
msg(TL.COMMAND_UNCLAIM_UNCLAIMS);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(),flocation.getCoordString(),otherFaction.getTag()));
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), flocation.getCoordString(), otherFaction.getTag()));
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -109,7 +108,7 @@ public class CmdUnclaim extends FCommand {
|
||||
myFaction.msg(TL.COMMAND_UNCLAIM_FACTIONUNCLAIMED, fme.describeTo(myFaction, true));
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(),flocation.getCoordString(),otherFaction.getTag()));
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), flocation.getCoordString(), otherFaction.getTag()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.massivecraft.factions.event.LandUnclaimAllEvent;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdUnclaimall extends FCommand {
|
||||
@@ -51,7 +50,7 @@ public class CmdUnclaimall extends FCommand {
|
||||
myFaction.msg(TL.COMMAND_UNCLAIMALL_UNCLAIMED, fme.describeTo(myFaction, true));
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIMALL_LOG.format(fme.getName(),myFaction.getTag()));
|
||||
P.p.log(TL.COMMAND_UNCLAIMALL_LOG.format(fme.getName(), myFaction.getTag()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ public class CmdVersion extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
msg(TL.COMMAND_VERSION_VERSION,P.p.getDescription().getFullName());
|
||||
msg(TL.GENERIC_TRANSLATION_VERSION,TL._LOCALE,TL._LOCAL_LANGUAGE,TL._LOCAL_REGION,TL._LOCAL_STATE);
|
||||
msg(TL.GENERIC_TRANSLATION_CONTRIBUTORS,TL._LOCAL_AUTHOR);
|
||||
msg(TL.GENERIC_TRANSLATION_RESPONSIBLE,TL._LOCAL_RESPONSIBLE);
|
||||
msg(TL.COMMAND_VERSION_VERSION, P.p.getDescription().getFullName());
|
||||
msg(TL.GENERIC_TRANSLATION_VERSION, TL._LOCALE, TL._LOCAL_LANGUAGE, TL._LOCAL_REGION, TL._LOCAL_STATE);
|
||||
msg(TL.GENERIC_TRANSLATION_CONTRIBUTORS, TL._LOCAL_AUTHOR);
|
||||
msg(TL.GENERIC_TRANSLATION_RESPONSIBLE, TL._LOCAL_RESPONSIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.MCommand;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -276,9 +275,9 @@ public abstract class FCommand extends MCommand<P> {
|
||||
return Econ.modifyMoney(fme, -cost, toDoThis, forDoingThis);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean payForCommand(double cost,TL toDoThis,TL forDoingThis){
|
||||
return payForCommand(cost,toDoThis.toString(),forDoingThis.toString());
|
||||
|
||||
public boolean payForCommand(double cost, TL toDoThis, TL forDoingThis) {
|
||||
return payForCommand(cost, toDoThis.toString(), forDoingThis.toString());
|
||||
}
|
||||
|
||||
// like above, but just make sure they can pay; returns true unless person can't afford the cost
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.massivecraft.factions.scoreboards.FTeamWrapper;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
@@ -52,7 +51,7 @@ public abstract class FRelationCommand extends FCommand {
|
||||
}
|
||||
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!payForCommand(targetRelation.getRelationCost(),TL.COMMAND_RELATIONS_TOMARRY , TL.COMMAND_RELATIONS_FORMARRY)) {
|
||||
if (!payForCommand(targetRelation.getRelationCost(), TL.COMMAND_RELATIONS_TOMARRY, TL.COMMAND_RELATIONS_FORMARRY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,15 +67,15 @@ public abstract class FRelationCommand extends FCommand {
|
||||
FactionRelationEvent relationEvent = new FactionRelationEvent(myFaction, them, oldRelation, currentRelation);
|
||||
Bukkit.getServer().getPluginManager().callEvent(relationEvent);
|
||||
|
||||
them.msg(TL.COMMAND_RELATIONS_MUTUAL, currentRelationColor + targetRelation.getTranslation() ,currentRelationColor + myFaction.getTag());
|
||||
myFaction.msg(TL.COMMAND_RELATIONS_MUTUAL, currentRelationColor + targetRelation.getTranslation() ,currentRelationColor + myFaction.getTag());
|
||||
them.msg(TL.COMMAND_RELATIONS_MUTUAL, currentRelationColor + targetRelation.getTranslation(), currentRelationColor + myFaction.getTag());
|
||||
myFaction.msg(TL.COMMAND_RELATIONS_MUTUAL, currentRelationColor + targetRelation.getTranslation(), currentRelationColor + myFaction.getTag());
|
||||
}
|
||||
// inform the other faction of your request
|
||||
else {
|
||||
|
||||
them.msg(TL.COMMAND_RELATIONS_PROPOSAL_1,currentRelationColor + myFaction.getTag(),targetRelation.getColor() + targetRelation.getTranslation());
|
||||
them.msg(TL.COMMAND_RELATIONS_PROPOSAL_2,Conf.baseCommandAliases.get(0),targetRelation,myFaction.getTag());
|
||||
myFaction.msg(TL.COMMAND_RELATIONS_PROPOSAL_SENT,currentRelationColor + them.getTag(),"" + targetRelation.getColor() + targetRelation);
|
||||
|
||||
them.msg(TL.COMMAND_RELATIONS_PROPOSAL_1, currentRelationColor + myFaction.getTag(), targetRelation.getColor() + targetRelation.getTranslation());
|
||||
them.msg(TL.COMMAND_RELATIONS_PROPOSAL_2, Conf.baseCommandAliases.get(0), targetRelation, myFaction.getTag());
|
||||
myFaction.msg(TL.COMMAND_RELATIONS_PROPOSAL_SENT, currentRelationColor + them.getTag(), "" + targetRelation.getColor() + targetRelation);
|
||||
}
|
||||
|
||||
if (!targetRelation.isNeutral() && them.isPeaceful()) {
|
||||
|
||||
Reference in New Issue
Block a user