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 (damager instanceof Player) {
|
||||||
if (notify) {
|
if (notify) {
|
||||||
FPlayer attacker = FPlayers.getInstance().getByPlayer((Player) damager);
|
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;
|
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?
|
// 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 (locFaction.noPvPInTerritory()) {
|
||||||
if (notify) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.iface.RelationParticipator;
|
import com.massivecraft.factions.iface.RelationParticipator;
|
||||||
import com.massivecraft.factions.struct.Relation;
|
import com.massivecraft.factions.struct.Relation;
|
||||||
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import com.massivecraft.factions.zcore.util.TextUtil;
|
import com.massivecraft.factions.zcore.util.TextUtil;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
public class RelationUtil {
|
public class RelationUtil {
|
||||||
@ -23,14 +25,14 @@ public class RelationUtil {
|
|||||||
|
|
||||||
if (that instanceof Faction) {
|
if (that instanceof Faction) {
|
||||||
if (me instanceof FPlayer && myFaction == thatFaction) {
|
if (me instanceof FPlayer && myFaction == thatFaction) {
|
||||||
ret = "your faction";
|
ret = TL.GENERIC_YOURFACTION.toString();
|
||||||
} else {
|
} else {
|
||||||
ret = thatFaction.getTag();
|
ret = thatFaction.getTag();
|
||||||
}
|
}
|
||||||
} else if (that instanceof FPlayer) {
|
} else if (that instanceof FPlayer) {
|
||||||
FPlayer fplayerthat = (FPlayer) that;
|
FPlayer fplayerthat = (FPlayer) that;
|
||||||
if (that == me) {
|
if (that == me) {
|
||||||
ret = "you";
|
ret = TL.GENERIC_YOU.toString();
|
||||||
} else if (thatFaction == myFaction) {
|
} else if (thatFaction == myFaction) {
|
||||||
ret = fplayerthat.getNameAndTitle();
|
ret = fplayerthat.getNameAndTitle();
|
||||||
} else {
|
} else {
|
||||||
|
@ -543,6 +543,8 @@ public enum TL {
|
|||||||
/**
|
/**
|
||||||
* More generic, or less easily categorisable translations, which may apply to more than one class
|
* 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_NOPERMISSION("<b>You don't have permission to %1$s."),
|
||||||
GENERIC_DOTHAT("do that"), //Ugh nuke this from high orbit
|
GENERIC_DOTHAT("do that"), //Ugh nuke this from high orbit
|
||||||
GENERIC_NOPLAYERMATCH("<b>No player match found for \"<p>%1$s<b>\"."),
|
GENERIC_NOPLAYERMATCH("<b>No player match found for \"<p>%1$s<b>\"."),
|
||||||
@ -605,9 +607,18 @@ public enum TL {
|
|||||||
ROLE_MODERATOR("moderator"),
|
ROLE_MODERATOR("moderator"),
|
||||||
ROLE_NORMAL("normal member"),
|
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
|
* 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_SAFEAUTO("<i>This land is now a safe zone."),
|
||||||
PLAYER_WARAUTO("<i>This land is now a war 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."),
|
PLAYER_OUCH("<b>Ouch, that is starting to hurt. You should give it a rest."),
|
||||||
|
Loading…
Reference in New Issue
Block a user