Yet more TL. Hi @Bonkozorus
This commit is contained in:
parent
d69f9e5688
commit
1d00a0aa54
@ -283,7 +283,7 @@ public class FactionsEntityListener implements Listener {
|
||||
if (damager instanceof Player) {
|
||||
if (notify) {
|
||||
FPlayer attacker = FPlayers.getInstance().getByPlayer((Player) damager);
|
||||
attacker.msg("<i>You can't hurt other players in " + (defLocFaction.isSafeZone() ? "a SafeZone." : "peaceful territory."));
|
||||
attacker.msg(TL.PLAYER_CANTHURT, (defLocFaction.isSafeZone() ? TL.REGION_SAFEZONE.toString() : TL.REGION_PEACEFUL.toString()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -316,7 +316,7 @@ public class FactionsEntityListener implements Listener {
|
||||
// so we know from above that the defender isn't in a safezone... what about the attacker, sneaky dog that he might be?
|
||||
if (locFaction.noPvPInTerritory()) {
|
||||
if (notify) {
|
||||
attacker.msg("<i>You can't hurt other players while you are in " + (locFaction.isSafeZone() ? "a SafeZone." : "peaceful territory."));
|
||||
attacker.msg(TL.PLAYER_CANTHURT, (locFaction.isSafeZone() ? TL.REGION_SAFEZONE.toString() : TL.REGION_PEACEFUL.toString()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -5,7 +5,9 @@ import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.iface.RelationParticipator;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TextUtil;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class RelationUtil {
|
||||
@ -23,14 +25,14 @@ public class RelationUtil {
|
||||
|
||||
if (that instanceof Faction) {
|
||||
if (me instanceof FPlayer && myFaction == thatFaction) {
|
||||
ret = "your faction";
|
||||
ret = TL.GENERIC_YOURFACTION.toString();
|
||||
} else {
|
||||
ret = thatFaction.getTag();
|
||||
}
|
||||
} else if (that instanceof FPlayer) {
|
||||
FPlayer fplayerthat = (FPlayer) that;
|
||||
if (that == me) {
|
||||
ret = "you";
|
||||
ret = TL.GENERIC_YOU.toString();
|
||||
} else if (thatFaction == myFaction) {
|
||||
ret = fplayerthat.getNameAndTitle();
|
||||
} else {
|
||||
|
@ -543,6 +543,8 @@ public enum TL {
|
||||
/**
|
||||
* More generic, or less easily categorisable translations, which may apply to more than one class
|
||||
*/
|
||||
GENERIC_YOU("you"),
|
||||
GENERIC_YOURFACTION("your faction"),
|
||||
GENERIC_NOPERMISSION("<b>You don't have permission to %1$s."),
|
||||
GENERIC_DOTHAT("do that"), //Ugh nuke this from high orbit
|
||||
GENERIC_NOPLAYERMATCH("<b>No player match found for \"<p>%1$s<b>\"."),
|
||||
@ -605,9 +607,18 @@ public enum TL {
|
||||
ROLE_MODERATOR("moderator"),
|
||||
ROLE_NORMAL("normal member"),
|
||||
|
||||
/**
|
||||
* Region types.
|
||||
*/
|
||||
REGION_SAFEZONE("safezone"),
|
||||
REGION_WARZONE("warzone"),
|
||||
REGION_WILDERNESS("wilderness"),
|
||||
|
||||
REGION_PEACEFUL("peaceful territory"),
|
||||
/**
|
||||
* In the player and entity listeners
|
||||
*/
|
||||
PLAYER_CANTHURT("<i>You may not harm other players in %s"),
|
||||
PLAYER_SAFEAUTO("<i>This land is now a safe zone."),
|
||||
PLAYER_WARAUTO("<i>This land is now a war zone."),
|
||||
PLAYER_OUCH("<b>Ouch, that is starting to hurt. You should give it a rest."),
|
||||
|
Loading…
Reference in New Issue
Block a user