Internationalized player interface, Russian locale

Most player-interfaced features such as event responders, signs, and
some player commands now have their messages stored externally in a
resource bundle. This allows for easy localization of the plugin by
copying the main messages.properties file and translating all the
messages into the language of choice.

Also thanks to @AlexMerser21 for the partial russian localization of the
plugin. This means that War servers can now show messages in the russian
language simply by starting the minecraft server with the flag
-Duser.language=ru.
This commit is contained in:
cmastudios 2013-09-28 22:25:10 -05:00
parent a7458bf261
commit 5913f73fcb
23 changed files with 651 additions and 343 deletions

View File

@ -55,12 +55,8 @@
</plugins>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources/</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
</build>

View File

@ -316,7 +316,7 @@ public class Team {
String[] lines;
if (this.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL) == -1) {
lines = MessageFormat
.format("Team {0}\n{1}/{2} players\n{3}/{4} pts\nunlimited lives",
.format(War.war.getString("sign.team.unlimited"),
this.name,
this.players.size(),
this.getTeamConfig().resolveInt(
@ -326,7 +326,7 @@ public class Team {
TeamConfig.MAXSCORE)).split("\n");
} else {
lines = MessageFormat
.format("Team {0}\n{1}/{2} players\n{3}/{4} pts\n{5} lives left",
.format(War.war.getString("sign.team.limited"),
this.name,
this.players.size(),
this.getTeamConfig().resolveInt(
@ -418,6 +418,27 @@ public class Team {
}
}
public void teamcast(String message, Object... args) {
// by default a teamcast is a notification
teamcast(message, true, args);
}
public void teamcast(String message, boolean isNotification, Object... args) {
for (Player player : this.players) {
if (War.war.isSpoutServer()) {
SpoutPlayer sp = SpoutManager.getPlayer(player);
if (sp.isSpoutCraftEnabled() && isNotification) {
// team notifications go to the top left for Spout players to lessen War spam in chat box
War.war.getSpoutDisplayer().msg(sp, MessageFormat.format(message, args));
} else {
War.war.msg(player, message, args);
}
} else {
War.war.msg(player, message, args);
}
}
}
public void setName(String name) {
this.name = name;
}
@ -441,9 +462,7 @@ public class Team {
victim.getFlagVolume().resetBlocks();
victim.initializeTeamFlag();
this.warzone.removeFlagThief(thePlayer.getName());
for (Team t : this.warzone.getTeams()) {
t.teamcast("Team " + ChatColor.GREEN + victim.getName() + ChatColor.WHITE + " flag was returned.");
}
this.warzone.broadcast("drop.flag.broadcast", thePlayer.getName(), ChatColor.GREEN + victim.getName() + ChatColor.WHITE);
}
if (this.warzone.isBombThief(thePlayer.getName())) {
@ -451,9 +470,7 @@ public class Team {
bomb.getVolume().resetBlocks();
bomb.addBombBlocks();
this.warzone.removeBombThief(thePlayer.getName());
for (Team t : this.warzone.getTeams()) {
t.teamcast("Bomb " + ChatColor.GREEN + bomb.getName() + ChatColor.WHITE + " was returned.");
}
this.warzone.broadcast("drop.bomb.broadcast", thePlayer.getName(), ChatColor.GREEN + bomb.getName() + ChatColor.WHITE);
}
if (this.warzone.isCakeThief(thePlayer.getName())) {
@ -461,9 +478,7 @@ public class Team {
cake.getVolume().resetBlocks();
cake.addCakeBlocks();
this.warzone.removeCakeThief(thePlayer.getName());
for (Team t : this.warzone.getTeams()) {
t.teamcast("Cake " + ChatColor.GREEN + cake.getName() + ChatColor.WHITE + " was returned.");
}
this.warzone.broadcast("drop.cake.broadcast", thePlayer.getName(), ChatColor.GREEN + cake.getName() + ChatColor.WHITE);
}
if (War.war.isTagServer()) {
TagAPI.refreshPlayer(thePlayer);
@ -499,7 +514,7 @@ public class Team {
if (atLeastOnePlayerOnTeam && atLeastOnePlayerOnOtherTeam) {
this.points++;
} else if (!atLeastOnePlayerOnOtherTeam) {
this.teamcast("Can't score until at least one player joins another team.");
this.teamcast("zone.score.empty");
}
if (this.warzone.getScoreboardType() == ScoreboardType.POINTS) {
String teamName = kind.getColor() + name + ChatColor.RESET;
@ -739,4 +754,17 @@ public class Team {
public boolean isFull() {
return this.getPlayers().size() == this.getTeamConfig().resolveInt(TeamConfig.TEAMSIZE);
}
/**
* Get an array of player usernames for players on this team.
*
* @return array of usernames.
*/
public String[] getPlayerNames() {
String[] ret = new String[this.players.size()];
for (int i = 0; i < this.players.size(); i++) {
ret[i] = this.players.get(i).getName();
}
return ret;
}
}

View File

@ -2,10 +2,12 @@ package com.tommytony.war;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.logging.FileHandler;
import java.util.logging.Formatter;
import java.util.logging.Level;
@ -107,6 +109,7 @@ public class War extends JavaPlugin {
private SpoutDisplayer spoutMessenger = null;
private Logger warLogger;
private static final ResourceBundle messages = ResourceBundle.getBundle("messages");
private HubLobbyMaterials warhubMaterials = new HubLobbyMaterials(
new ItemStack(Material.GLASS), new ItemStack(Material.WOOD),
@ -249,24 +252,13 @@ public class War extends JavaPlugin {
// Add constants
this.getDeadlyAdjectives().clear();
this.getDeadlyAdjectives().add("");
this.getDeadlyAdjectives().add("");
this.getDeadlyAdjectives().add("mighty ");
this.getDeadlyAdjectives().add("deadly ");
this.getDeadlyAdjectives().add("fine ");
this.getDeadlyAdjectives().add("precise ");
this.getDeadlyAdjectives().add("brutal ");
this.getDeadlyAdjectives().add("powerful ");
for (String adjective : this.getString("pvp.kill.adjectives").split(";")) {
this.getDeadlyAdjectives().add(adjective);
}
this.getKillerVerbs().clear();
this.getKillerVerbs().add("killed");
this.getKillerVerbs().add("killed");
this.getKillerVerbs().add("killed");
this.getKillerVerbs().add("finished");
this.getKillerVerbs().add("annihilated");
this.getKillerVerbs().add("murdered");
this.getKillerVerbs().add("obliterated");
this.getKillerVerbs().add("exterminated");
for (String verb : this.getString("pvp.kill.verbs").split(";")) {
this.getKillerVerbs().add(verb);
}
// Load files
WarYmlMapper.load();
@ -901,19 +893,85 @@ public class War extends JavaPlugin {
public void msg(CommandSender sender, String str) {
if (sender instanceof Player) {
String out = ChatColor.GRAY + "War> " + ChatColor.WHITE + this.colorKnownTokens(str, ChatColor.WHITE) + " ";
sender.sendMessage(out);
StringBuilder output = new StringBuilder(ChatColor.GRAY.toString())
.append(this.getString("war.prefix")).append(
ChatColor.WHITE);
if (messages.containsKey(str)) {
output.append(this.colorKnownTokens(this.getString(str),
ChatColor.WHITE));
} else {
output.append(this.colorKnownTokens(str, ChatColor.WHITE));
}
sender.sendMessage(output.toString());
} else {
sender.sendMessage("War> " + str);
sender.sendMessage(this.getString("war.prefix")
+ (messages.containsKey(str) ? messages.getString(str)
: str));
}
}
public void badMsg(CommandSender sender, String str) {
if (sender instanceof Player) {
String out = ChatColor.GRAY + "War> " + ChatColor.RED + this.colorKnownTokens(str, ChatColor.RED) + " ";
sender.sendMessage(out);
StringBuilder output = new StringBuilder(ChatColor.GRAY.toString())
.append(this.getString("war.prefix")).append(ChatColor.RED);
if (messages.containsKey(str)) {
output.append(this.colorKnownTokens(this.getString(str), ChatColor.RED));
} else {
output.append(this.colorKnownTokens(str, ChatColor.RED));
}
sender.sendMessage(output.toString());
} else {
sender.sendMessage("War> " + str);
sender.sendMessage(this.getString("war.prefix")
+ (messages.containsKey(str) ? messages.getString(str)
: str));
}
}
public void msg(CommandSender sender, String str, Object... obj) {
if (sender instanceof Player) {
StringBuilder output = new StringBuilder(ChatColor.GRAY.toString())
.append(this.getString("war.prefix")).append(ChatColor.WHITE);
if (messages.containsKey(str)) {
output.append(MessageFormat.format(this.colorKnownTokens(
this.getString(str), ChatColor.WHITE), obj));
} else {
output.append(MessageFormat.format(
this.colorKnownTokens(str, ChatColor.WHITE), obj));
}
sender.sendMessage(output.toString());
} else {
StringBuilder output = new StringBuilder(
this.getString("war.prefix"));
if (messages.containsKey(str)) {
output.append(MessageFormat.format(this.getString(str), obj));
} else {
output.append(MessageFormat.format(str, obj));
}
sender.sendMessage(output.toString());
}
}
public void badMsg(CommandSender sender, String str, Object... obj) {
if (sender instanceof Player) {
StringBuilder output = new StringBuilder(ChatColor.GRAY.toString())
.append(this.getString("war.prefix")).append(ChatColor.RED);
if (messages.containsKey(str)) {
output.append(MessageFormat.format(this.colorKnownTokens(
this.getString(str), ChatColor.RED), obj));
} else {
output.append(MessageFormat.format(
this.colorKnownTokens(str, ChatColor.RED), obj));
}
sender.sendMessage(output.toString());
} else {
StringBuilder output = new StringBuilder(
this.getString("war.prefix"));
if (messages.containsKey(str)) {
output.append(MessageFormat.format(this.getString(str), obj));
} else {
output.append(MessageFormat.format(str, obj));
}
sender.sendMessage(output.toString());
}
}
@ -1227,4 +1285,8 @@ public class War extends JavaPlugin {
public void setMysqlConfig(MySQLConfig mysqlConfig) {
this.mysqlConfig = mysqlConfig;
}
public String getString(String key) {
return messages.getString(key);
}
}

View File

@ -1,11 +1,13 @@
package com.tommytony.war;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -192,20 +194,18 @@ public class Warzone {
}
public String getTeamInformation() {
String teamsMessage = "Teams: ";
StringBuilder teamsMessage = new StringBuilder(War.war.getString("zone.teaminfo.prefix"));
if (this.getTeams().isEmpty()) {
teamsMessage += "none.";
teamsMessage.append(War.war.getString("zone.teaminfo.none"));
} else {
for (Team team : this.getTeams()) {
teamsMessage += team.getName() + " (" + team.getPoints() + " points, " + team.getRemainingLifes() + "/"
+ team.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL) + " lives left. ";
for (Player member : team.getPlayers()) {
teamsMessage += member.getName() + " ";
}
teamsMessage += ") ";
teamsMessage.append('\n');
teamsMessage.append(MessageFormat.format(War.war.getString("zone.teaminfo.format"),
team.getName(), team.getPoints(), team.getRemainingLifes(),
team.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL), StringUtils.join(team.getPlayerNames())));
}
}
return teamsMessage;
return teamsMessage.toString();
}
public String getName() {
@ -905,11 +905,9 @@ public class Warzone {
if (!this.hasPlayerState(player.getName())) {
this.keepPlayerState(player);
}
War.war.msg(player, "Your inventory is in storage until you use '/war leave'.");
War.war.msg(player, "join.inventorystored");
this.respawnPlayer(lowestNoOfPlayers, player);
for (Team team : this.teams) {
team.teamcast("" + player.getName() + " joined team " + lowestNoOfPlayers.getName() + ".");
}
this.broadcast("join.broadcast", player.getName(), lowestNoOfPlayers.getName());
}
return lowestNoOfPlayers;
}
@ -961,7 +959,7 @@ public class Warzone {
}
}
t.teamcast("The battle is over. Team " + playerTeam.getName() + " lost: " + player.getName() + " died and there were no lives left in their life pool.");
t.teamcast("zone.battle.end", playerTeam.getName(), player.getName());
if (t.getPlayers().size() != 0 && !t.getTeamConfig().resolveBoolean(TeamConfig.FLAGPOINTSONLY)) {
if (!t.getName().equals(playerTeam.getName())) {
@ -969,7 +967,7 @@ public class Warzone {
t.addPoint();
t.resetSign();
}
scores += t.getName() + "(" + t.getPoints() + "/" + t.getTeamConfig().resolveInt(TeamConfig.MAXSCORE) + ") ";
scores += '\n' + t.getName() + "(" + t.getPoints() + "/" + t.getTeamConfig().resolveInt(TeamConfig.MAXSCORE) + ") ";
}
}
@ -986,11 +984,8 @@ public class Warzone {
War.war.getServer().getPluginManager().callEvent(event1);
if (!scores.equals("")) {
for (Team t : teams) {
t.teamcast("New scores - " + scores);
}
this.broadcast("zone.battle.newscores", scores);
}
// detect score cap
List<Team> scoreCapTeams = new ArrayList<Team>();
for (Team t : teams) {
@ -1005,14 +1000,10 @@ public class Warzone {
winnersStr += winner.getName() + " ";
}
}
this.handleScoreCapReached(winnersStr);
} else {
// A new battle starts. Reset the zone but not the teams.
for (Team t : teams) {
t.teamcast("A new battle begins. Resetting warzone...");
}
this.broadcast("zone.battle.reset");
this.reinitialize();
}
}
@ -1038,9 +1029,7 @@ public class Warzone {
}
}
for (Team t : this.getTeams()) {
t.teamcast(player.getName() + " died and dropped team " + victim.getName() + "'s flag.");
}
this.broadcast("drop.flag.broadcast", player.getName(), victim.getName());
}
// Bomb thieves
@ -1052,7 +1041,7 @@ public class Warzone {
this.removeBombThief(player.getName());
for (Team t : this.getTeams()) {
t.teamcast(player.getName() + " died and dropped bomb " + ChatColor.GREEN + bomb.getName() + ChatColor.WHITE + ".");
t.teamcast("drop.bomb.broadcast", player.getName(), ChatColor.GREEN + bomb.getName() + ChatColor.WHITE);
if (War.war.isSpoutServer()) {
for (Player p : t.getPlayers()) {
SpoutPlayer sp = SpoutManager.getPlayer(p);
@ -1077,7 +1066,7 @@ public class Warzone {
this.removeCakeThief(player.getName());
for (Team t : this.getTeams()) {
t.teamcast(player.getName() + " died and dropped cake " + ChatColor.GREEN + cake.getName() + ChatColor.WHITE + ".");
t.teamcast("drop.cake.broadcast", player.getName(), ChatColor.GREEN + cake.getName() + ChatColor.WHITE);
if (War.war.isSpoutServer()) {
for (Player p : t.getPlayers()) {
SpoutPlayer sp = SpoutManager.getPlayer(p);
@ -1099,9 +1088,7 @@ public class Warzone {
// Lifepool empty warning
if (remaining - 1 == 0) {
for (Team t : this.getTeams()) {
t.teamcast("Team " + playerTeam.getName() + "'s life pool is empty. One more death and they lose the battle!");
}
this.broadcast("zone.lifepool.empty", playerTeam.getName());
}
}
playerTeam.resetSign();
@ -1130,9 +1117,7 @@ public class Warzone {
if (removeFromTeam) {
playerTeam.removePlayer(player.getName());
}
for (Team t : this.getTeams()) {
t.teamcast(playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE + " left the zone.");
}
this.broadcast("leave.broadcast", playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE);
playerTeam.resetSign();
if (this.getLobby() != null) {
@ -1153,7 +1138,7 @@ public class Warzone {
War.war.getSpoutDisplayer().updateStats(player);
}
War.war.msg(player, "Your inventory is being restored.");
War.war.msg(player, "leave.inventoryrestore");
if (War.war.getWarHub() != null) {
War.war.getWarHub().resetZoneSign(this);
}
@ -1455,10 +1440,8 @@ public class Warzone {
// Use the loadout from the list in the settings
this.resetInventory(playerTeam, player, Loadout.getLoadout(loadouts, name).getContents());
}
if (isFirstRespawn && playerTeam.getInventories().resolveLoadouts().keySet().size() > 1) {
War.war.msg(player, "Equipped " + name + " loadout (sneak to switch).");
} else if (isToggle) {
War.war.msg(player, "Equipped " + name + " loadout.");
if (isFirstRespawn && playerTeam.getInventories().resolveLoadouts().keySet().size() > 1 || isToggle) {
War.war.msg(player, "zone.loadout.equip", name);
}
}
i++;
@ -1635,4 +1618,41 @@ public class Warzone {
public List<LogKillsDeathsJob.KillsDeathsRecord> getKillsDeathsTracker() {
return killsDeathsTracker;
}
/**
* Send a message to all teams.
* @param message Message or key to translate.
*/
public void broadcast(String message) {
for (Team team : this.teams) {
team.teamcast(message);
}
}
/**
* Send a message to all teams.
* @param message Message or key to translate.
* @param args Arguments for the formatter.
*/
public void broadcast(String message, Object... args) {
for (Team team : this.teams) {
team.teamcast(message, args);
}
}
public List<Player> getPlayers() {
List<Player> players = new ArrayList<Player>();
for (Team team : this.teams) {
players.addAll(team.getPlayers());
}
return players;
}
public int getPlayerCount() {
int count = 0;
for (Team team : this.teams) {
count += team.getPlayers().size();
}
return count;
}
}

View File

@ -64,6 +64,24 @@ public abstract class AbstractWarCommand {
War.war.badMsg(this.getSender(), message);
}
/**
* Sends a success message.
* @param message Message or key to translate
* @param args Arguments for the formatter
*/
public void msg(String message, Object... args) {
War.war.msg(this.getSender(), message, args);
}
/**
* Sends a failure message.
* @param message Message or key to translate
* @param args Arguments for the formatter
*/
public void badMsg(String message, Object... args) {
War.war.badMsg(this.getSender(), message, args);
}
/**
* Changes the command-sender
*

View File

@ -23,7 +23,7 @@ public class JoinCommand extends AbstractWarCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}
@ -56,26 +56,24 @@ public class JoinCommand extends AbstractWarCommand {
TeamKind kind = TeamKind.teamKindFromString(this.args[0]);
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.DISABLED)) {
this.badMsg("This warzone is disabled.");
this.badMsg("join.disabled");
} else if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.AUTOASSIGN)) {
this.badMsg("This warzone requires you to be automatically assigned to a team. Please enter the autoassign gate instead.");
this.badMsg("join.aarequired");
} else if (!zone.getWarzoneConfig().getBoolean(WarzoneConfig.JOINMIDBATTLE) && zone.isEnoughPlayers()) {
this.badMsg("You cannot join a battle in progress in this warzone.");
this.badMsg("join.progress");
} else {
Team team = zone.getTeamByKind(kind);
if (kind == null) {
this.badMsg("There is no team kind called " + args[0] + ".");
} else if (team == null) {
this.badMsg("This warzone does not contain a team " + kind.toString() + ".");
if (kind == null || team == null) {
this.badMsg("join.team404");
} else if (!War.war.canPlayWar(player, team)) {
this.badMsg("You don't have permission to join this team.");
this.badMsg("join.permission.single");
} else if (team.isFull()) {
this.badMsg("Team " + team.getName() + " is full.");
this.badMsg("join.full.single", team.getName());
} else {
Team previousTeam = Team.getTeamByPlayerName(player.getName());
if (previousTeam != null) {
if (previousTeam == team) {
War.war.badMsg(player, "You cannot join your own team.");
this.badMsg("join.selfteam");
return true;
}
if (!previousTeam.removePlayer(player.getName())) {
@ -88,7 +86,7 @@ public class JoinCommand extends AbstractWarCommand {
}
if (!zone.hasPlayerState(player.getName())) {
zone.keepPlayerState(player);
this.msg("Your inventory is in storage until you use '/war leave'.");
this.msg("join.inventorystored");
}
team.addPlayer(player);
team.resetSign();
@ -96,9 +94,7 @@ public class JoinCommand extends AbstractWarCommand {
if (War.war.getWarHub() != null) {
War.war.getWarHub().resetZoneSign(zone);
}
for (Team localTeam : zone.getTeams()) {
localTeam.teamcast(String.format("%s joined team %s.", player.getName(), team.getName()));
}
zone.broadcast("join.broadcast", player.getName(), team.getName());
}
}
return true;

View File

@ -21,7 +21,7 @@ public class LeaveCommand extends AbstractWarCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}

View File

@ -5,7 +5,6 @@ import java.util.logging.Level;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.tommytony.war.Team;
import com.tommytony.war.War;
import com.tommytony.war.Warzone;
import com.tommytony.war.structure.ZoneLobby;
@ -42,9 +41,7 @@ public class NextBattleCommand extends AbstractZoneMakerCommand {
}
zone.clearThieves();
for (Team team : zone.getTeams()) {
team.teamcast("The battle was interrupted. " + zone.getTeamInformation() + " Resetting warzone " + zone.getName() + " and life pools...");
}
zone.broadcast("zone.battle.next", zone.getName());
zone.reinitialize();
War.war.log(this.getSender().getName() + " used nextbattle in warzone " + zone.getName(), Level.INFO);

View File

@ -24,7 +24,7 @@ public class SetWarHubCommand extends AbstractWarAdminCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}

View File

@ -19,7 +19,7 @@ public class SetZoneCommand extends AbstractZoneMakerCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}

View File

@ -20,7 +20,7 @@ public class TeamCommand extends AbstractWarCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}

View File

@ -121,9 +121,9 @@ public class WarCommandHandler {
}
// we are not responsible for any other command
} catch (NotWarAdminException e) {
War.war.badMsg(sender, "You can't do this if you are not a War admin (permission war.admin).");
War.war.badMsg(sender, "war.notadmin");
} catch (NotZoneMakerException e) {
War.war.badMsg(sender, "You can't do this if you are not a warzone maker (permission war.zonemaker).");
War.war.badMsg(sender, "war.notzm");
} catch (Exception e) {
War.war.log("An error occured while handling command " + cmd.getName() + ". Exception:" + e.getClass().toString() + " " + e.getMessage(), Level.WARNING);
e.printStackTrace();

View File

@ -20,7 +20,7 @@ public class WarhubCommand extends AbstractWarCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}
if (this.args.length != 0) {
@ -28,9 +28,9 @@ public class WarhubCommand extends AbstractWarCommand {
}
Player player = (Player) this.getSender();
if (War.war.getWarHub() == null) {
this.badMsg("No warhub on this War server. Try /zones and /zone.");
this.badMsg("warhub.none");
} else if (!War.war.canWarp(player)) {
this.badMsg("Can't warp to warhub. You need the 'war.warp' permission.");
this.badMsg("warhub.permission");
} else {
Warzone playerWarzone = Warzone.getZoneByPlayerName(player.getName());
if (playerWarzone != null) { // was in zone

View File

@ -21,7 +21,7 @@ public class WarzoneCommand extends AbstractWarCommand {
@Override
public boolean handle() {
if (!(this.getSender() instanceof Player)) {
this.badMsg("You can't do this if you are not in-game.");
this.badMsg("command.console");
return true;
}
Player player = (Player) this.getSender();
@ -36,10 +36,10 @@ public class WarzoneCommand extends AbstractWarCommand {
player.teleport(warzone.getTeleport());
}
} else {
this.badMsg("Warzone " + args[0] + " could not be found.");
this.badMsg("zone.zone404");
}
} else {
this.badMsg("You do not have permission to teleport to the warzone.");
this.badMsg("zone.warp.permission");
}
return true;
} else if (args.length == 2 && (args[1].equalsIgnoreCase("sb")
@ -54,10 +54,10 @@ public class WarzoneCommand extends AbstractWarCommand {
player.setScoreboard(warzone.getScoreboard());
}
} else {
this.badMsg("Warzone " + args[0] + " has not enabled a scoreboard.");
this.badMsg("zone.score.board404");
}
} else {
this.badMsg("Warzone " + args[0] + " could not be found.");
this.badMsg("zone.zone404");
}
return true;
} else {

View File

@ -1,10 +1,10 @@
package com.tommytony.war.command;
import java.text.MessageFormat;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.tommytony.war.Team;
import com.tommytony.war.War;
import com.tommytony.war.Warzone;
@ -23,21 +23,18 @@ public class WarzonesCommand extends AbstractWarCommand {
if (this.args.length != 0) {
return false;
}
String warzonesMessage = "Warzones: ";
StringBuilder warzonesMessage = new StringBuilder(War.war.getString("zone.zoneinfo.prefix"));
if (War.war.getWarzones().isEmpty()) {
warzonesMessage += "none.";
warzonesMessage.append(War.war.getString("zone.teaminfo.none"));
} else {
for (Warzone warzone : War.war.getWarzones()) {
warzonesMessage += warzone.getName() + " (" + warzone.getTeams().size() + " teams, ";
int playerTotal = 0;
for (Team team : warzone.getTeams()) {
playerTotal += team.getPlayers().size();
}
warzonesMessage += playerTotal + " players) ";
warzonesMessage.append('\n');
warzonesMessage.append(MessageFormat.format(War.war.getString("zone.zoneinfo.format"),
warzone.getName(), warzone.getTeams().size(), warzone.getPlayerCount()));
}
}
this.msg(warzonesMessage + ((this.getSender() instanceof Player) ? " Use /zone <zone-name> to teleport to a warzone." : ""));
this.msg(warzonesMessage.toString() + ((this.getSender() instanceof Player) ? War.war.getString("zone.zoneinfo.teleport") : ""));
return true;
}

View File

@ -3,6 +3,7 @@ package com.tommytony.war.config;
import org.bukkit.ChatColor;
import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.MaterialData;
import org.bukkit.material.Wool;
@ -146,4 +147,32 @@ public enum TeamKind {
}
return null;
}
/**
* Check if a block is this team's color block.
*
* @param block Wool block to check.
* @return true if block is this team's color.
*/
public boolean isTeamBlock(BlockState block) {
if (block.getType() != Material.WOOL || !(block.getData() instanceof Wool)) {
return false;
}
Wool wool = (Wool) block.getData();
return wool.getColor() == dyeColor;
}
/**
* Check if an item is this team's color block.
*
* @param item Wool item to check.
* @return true if item is this team's color.
*/
public boolean isTeamItem(ItemStack item) {
if (item.getType() != Material.WOOL || !(item.getData() instanceof Wool)) {
return false;
}
Wool wool = (Wool) item.getData();
return wool.getColor() == dyeColor;
}
}

View File

@ -1,7 +1,5 @@
package com.tommytony.war.event;
import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
@ -22,7 +20,6 @@ import org.getspout.spoutapi.player.SpoutPlayer;
import com.tommytony.war.Team;
import com.tommytony.war.War;
import com.tommytony.war.Warzone;
import com.tommytony.war.config.FlagReturn;
import com.tommytony.war.config.WarConfig;
import com.tommytony.war.config.WarzoneConfig;
import com.tommytony.war.spout.SpoutDisplayer;
@ -57,13 +54,10 @@ public class WarBlockListener implements Listener {
// Monument capturing
if (team != null && block != null && zone != null
&& zone.isMonumentCenterBlock(block)
&& block.getType() == team.getKind().getMaterial()
&& block.getState().getData() == team.getKind().getBlockData()) {
&& team.getKind().isTeamBlock(block.getState())) {
Monument monument = zone.getMonumentFromCenterBlock(block);
if (monument != null && !monument.hasOwner()) {
monument.capture(team);
List<Team> teams = zone.getTeams();
if (War.war.isSpoutServer()) {
for (Player p : team.getPlayers()) {
SpoutPlayer sp = SpoutManager.getPlayer(p);
@ -77,13 +71,11 @@ public class WarBlockListener implements Listener {
}
}
}
for (Team t : teams) {
t.teamcast("Monument " + monument.getName() + " has been captured by team " + team.getName() + ".");
}
zone.broadcast("zone.monument.capture", monument.getName(), team.getName());
event.setCancelled(false);
return; // important otherwise cancelled down a few line by isImportantblock
} else {
War.war.badMsg(player, "You must capture a monument with a block of your team's wool color. Get one from your team spawn.");
War.war.badMsg(player, "zone.monument.badblock");
cancelAndKeepItem(event);
return;
}
@ -94,7 +86,7 @@ public class WarBlockListener implements Listener {
if (zone != null
&& (zone.isImportantBlock(block) || zone.isOpponentSpawnPeripheryBlock(team, block))
&& (!isZoneMaker || (isZoneMaker && team != null))) {
War.war.badMsg(player, "Can't build here.");
War.war.badMsg(player, "build.denied.location");
cancelAndKeepItem(event);
return;
}
@ -102,7 +94,7 @@ public class WarBlockListener implements Listener {
// protect warzone lobbies
for (Warzone wz : War.war.getWarzones()) {
if (wz.getLobby() != null && wz.getLobby().getVolume() != null && wz.getLobby().getVolume().contains(block)) {
War.war.badMsg(player, "Can't build here.");
War.war.badMsg(player, "build.denied.location");
cancelAndKeepItem(event);
return;
}
@ -110,7 +102,7 @@ public class WarBlockListener implements Listener {
// protect the hub
if (War.war.getWarHub() != null && War.war.getWarHub().getVolume().contains(block)) {
War.war.badMsg(player, "Can't build here.");
War.war.badMsg(player, "build.denied.location");
cancelAndKeepItem(event);
return;
}
@ -118,7 +110,7 @@ public class WarBlockListener implements Listener {
// buildInZonesOnly
if (zone == null && War.war.getWarConfig().getBoolean(WarConfig.BUILDINZONESONLY) && !War.war.canBuildOutsideZone(player)) {
if (!War.war.getWarConfig().getBoolean(WarConfig.DISABLEBUILDMESSAGE)) {
War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside.");
War.war.badMsg(player, "build.denied.outside");
}
cancelAndKeepItem(event);
return;
@ -126,28 +118,28 @@ public class WarBlockListener implements Listener {
// can't place a block of your team's color
if (team != null && block.getType() == team.getKind().getMaterial() && block.getState().getData() == team.getKind().getBlockData()) {
War.war.badMsg(player, "You can only use your team's blocks to capture monuments.");
War.war.badMsg(player, "build.denied.teamblock");
cancelAndKeepItem(event);
return;
}
// a flag thief can't drop his flag
if (team != null && zone != null && zone.isFlagThief(player.getName())) {
War.war.badMsg(player, "Can't drop the flag. What are you doing? Run!");
War.war.badMsg(player, "drop.flag.disabled");
cancelAndKeepItem(event);
return;
}
// a bomb thief can't drop his bomb
if (team != null && zone != null && zone.isBombThief(player.getName())) {
War.war.badMsg(player, "Can't drop the bomb. What are you doing? Run for your enemy's spawn!");
War.war.badMsg(player, "drop.bomb.disabled");
cancelAndKeepItem(event);
return;
}
// a cake thief can't drop his cake
if (team != null && zone != null && zone.isCakeThief(player.getName())) {
War.war.badMsg(player, "Can't drop the cake. What are you doing? Run to your spawn!");
War.war.badMsg(player, "drop.cake.disabled");
cancelAndKeepItem(event);
return;
}
@ -155,7 +147,7 @@ public class WarBlockListener implements Listener {
// unbreakableZoneBlocks
if (zone != null && zone.getWarzoneConfig().getBoolean(WarzoneConfig.UNBREAKABLE) && (!isZoneMaker || (isZoneMaker && team != null))) {
// if the zone is unbreakable, no one but zone makers can break blocks (even then, zone makers in a team can't break blocks)
War.war.badMsg(player, "The blocks in this zone are unbreakable - this also means you can't build!");
War.war.badMsg(player, "build.denied.zone.place");
cancelAndKeepItem(event);
return;
}
@ -245,7 +237,7 @@ public class WarBlockListener implements Listener {
if (warzone != null && team == null && !isZoneMaker) {
// can't actually destroy blocks in a warzone if not part of a team
War.war.badMsg(player, "Can't destroy part of a warzone if you're not in a team.");
War.war.badMsg(player, "build.denied.zone.outside");
event.setCancelled(true);
return;
}
@ -253,7 +245,6 @@ public class WarBlockListener implements Listener {
if (team != null && block != null && warzone != null && warzone.isMonumentCenterBlock(block)) {
Monument monument = warzone.getMonumentFromCenterBlock(block);
if (monument.hasOwner()) {
List<Team> teams = warzone.getTeams();
Team ownerTeam = monument.getOwnerTeam();
if (War.war.isSpoutServer()) {
for (Player p : team.getPlayers()) {
@ -268,9 +259,7 @@ public class WarBlockListener implements Listener {
}
}
}
for (Team t : teams) {
t.teamcast("Team " + ownerTeam.getName() + " loses control of monument " + monument.getName());
}
warzone.broadcast("zone.monument.lose", ownerTeam.getName(), monument.getName());
monument.uncapture();
}
event.setCancelled(false);
@ -282,7 +271,7 @@ public class WarBlockListener implements Listener {
if (team != null && team.isSpawnLocation(block.getLocation())) {
// let team members loot one block the spawn for monument captures
if (player.getInventory().containsAtLeast(team.getKind().getBlockHead(), 1)) {
War.war.badMsg(player, "You already have a " + team.getName() + " block.");
War.war.badMsg(player, "build.denied.zone.multteam", team.getName());
event.setCancelled(true);
return;
} else {
@ -294,9 +283,9 @@ public class WarBlockListener implements Listener {
if (team != null && warzone.isEnemyTeamFlagBlock(team, block)) {
if (warzone.isFlagThief(player.getName())) {
// detect audacious thieves
War.war.badMsg(player, "You can only steal one flag at a time!");
War.war.badMsg(player, "zone.stealextra.flag");
} else if (warzone.isBombThief(player.getName()) || warzone.isCakeThief(player.getName())) {
War.war.badMsg(player, "You can only steal one thing at a time!");
War.war.badMsg(player, "zone.stealextra.other");
} else {
Team lostFlagTeam = warzone.getTeamForFlagBlock(block);
if (lostFlagTeam.getPlayers().size() != 0) {
@ -306,15 +295,8 @@ public class WarBlockListener implements Listener {
player.getInventory().addItem(teamKindBlock);
warzone.addFlagThief(lostFlagTeam, player.getName());
block.setType(Material.AIR);
String spawnOrFlag = "spawn or flag";
if (team.getTeamConfig().resolveFlagReturn().equals(FlagReturn.FLAG)
|| team.getTeamConfig().resolveFlagReturn() == FlagReturn.SPAWN) {
spawnOrFlag = team.getTeamConfig().resolveFlagReturn().toString();
}
for (Team t : warzone.getTeams()) {
t.teamcast(team.getKind().getColor() + player.getName() + ChatColor.WHITE + " stole team " + lostFlagTeam.getName() + "'s flag.");
t.teamcast("zone.steal.flag.broadcast", team.getKind().getColor() + player.getName() + ChatColor.WHITE, lostFlagTeam.getName());
if (t.getName().equals(lostFlagTeam.getName())) {
if (War.war.isSpoutServer()) {
for (Player p : t.getPlayers()) {
@ -329,15 +311,12 @@ public class WarBlockListener implements Listener {
}
}
}
t.teamcast("Prevent " + team.getKind().getColor() + player.getName() + ChatColor.WHITE
+ " from reaching team " + team.getName() + "'s " + spawnOrFlag + ".");
t.teamcast("zone.steal.flag.prevent", team.getKind().getColor() + player.getName() + ChatColor.WHITE, team.getName());
}
}
War.war.msg(player, "You have team " + lostFlagTeam.getName() + "'s flag. Reach your team " + spawnOrFlag + " to capture it!");
War.war.msg(player, "zone.steal.flag.notice", lostFlagTeam.getName());
} else {
War.war.msg(player, "You can't steal team " + lostFlagTeam.getName() + "'s flag since no players are on that team.");
War.war.msg(player, "zone.steal.flag.empty", lostFlagTeam.getName());
}
}
event.setCancelled(true);
@ -345,9 +324,9 @@ public class WarBlockListener implements Listener {
} else if (team != null && warzone.isBombBlock(block)) {
if (warzone.isBombThief(player.getName())) {
// detect audacious thieves
War.war.badMsg(player, "You can only steal one bomb at a time!");
War.war.badMsg(player, "zone.stealextra.bomb");
} else if (warzone.isFlagThief(player.getName()) || warzone.isCakeThief(player.getName())) {
War.war.badMsg(player, "You can only steal one thing at a time!");
War.war.badMsg(player, "zone.stealextra.other");
} else {
Bomb bomb = warzone.getBombForBlock(block);
// player just broke the bomb block: cancel to avoid drop, give player the block, set block to air
@ -357,10 +336,8 @@ public class WarBlockListener implements Listener {
player.getInventory().addItem(tntBlock);
warzone.addBombThief(bomb, player.getName());
block.setType(Material.AIR);
for (Team t : warzone.getTeams()) {
t.teamcast(team.getKind().getColor() + player.getName() + ChatColor.WHITE + " has bomb " + ChatColor.GREEN + bomb.getName() + ChatColor.WHITE + ".");
t.teamcast("zone.steal.bomb.broadcast", team.getKind().getColor() + player.getName() + ChatColor.WHITE, ChatColor.GREEN + bomb.getName() + ChatColor.WHITE);
if (War.war.isSpoutServer()) {
for (Player p : t.getPlayers()) {
SpoutPlayer sp = SpoutManager.getPlayer(p);
@ -374,23 +351,18 @@ public class WarBlockListener implements Listener {
}
}
}
t.teamcast("Prevent " + team.getKind().getColor() + player.getName() + ChatColor.WHITE
+ " from reaching your spawn with the bomb!");
t.teamcast("zone.steal.bomb.prevent", team.getKind().getColor() + player.getName() + ChatColor.WHITE);
}
War.war.msg(player, "You have bomb " + bomb.getName() + ". Reach another team's spawn to score. Don't get touched by anyone or you'll blow up!");
War.war.msg(player, "zone.steal.bomb.notice", bomb.getName());
}
event.setCancelled(true);
return;
} else if (team != null && warzone.isCakeBlock(block)) {
if (warzone.isCakeThief(player.getName())) {
// detect audacious thieves
War.war.badMsg(player, "You can only steal one cake at a time!");
War.war.badMsg(player, "zone.stealextra.cake");
} else if (warzone.isFlagThief(player.getName()) || warzone.isBombThief(player.getName())) {
War.war.badMsg(player, "You can only steal one thing at a time!");
War.war.badMsg(player, "zone.stealextra.other");
} else {
Cake cake = warzone.getCakeForBlock(block);
// player just broke the cake block: cancel to avoid drop, give player the block, set block to air
@ -400,10 +372,8 @@ public class WarBlockListener implements Listener {
player.getInventory().addItem(cakeBlock);
warzone.addCakeThief(cake, player.getName());
block.setType(Material.AIR);
for (Team t : warzone.getTeams()) {
t.teamcast(team.getKind().getColor() + player.getName() + ChatColor.WHITE + " has cake " + ChatColor.GREEN + cake.getName() + ChatColor.WHITE + ".");
t.teamcast("zone.steal.cake.broadcast", team.getKind().getColor() + player.getName() + ChatColor.WHITE, ChatColor.GREEN + cake.getName() + ChatColor.WHITE);
if (War.war.isSpoutServer()) {
for (Player p : t.getPlayers()) {
SpoutPlayer sp = SpoutManager.getPlayer(p);
@ -417,19 +387,14 @@ public class WarBlockListener implements Listener {
}
}
}
t.teamcast("Prevent " + team.getKind().getColor() + player.getName() + ChatColor.WHITE
+ " from reaching their spawn with the cake!");
t.teamcast("zone.steal.cake.prevent", team.getKind().getColor() + player.getName() + ChatColor.WHITE);
}
War.war.msg(player, "You have cake " + cake.getName() + ". Reach your team's spawn to score and replenish your lifepool.");
War.war.msg(player, "zone.steal.cake.notice", cake.getName());
}
event.setCancelled(true);
return;
} else if (!warzone.isMonumentCenterBlock(block)) {
War.war.badMsg(player, "Can't destroy this.");
War.war.badMsg(player, "build.denied.location");
event.setCancelled(true);
return;
}
@ -439,7 +404,7 @@ public class WarBlockListener implements Listener {
if (block != null) {
for (Warzone zone : War.war.getWarzones()) {
if (zone.getLobby() != null && zone.getLobby().getVolume() != null && zone.getLobby().getVolume().contains(block)) {
War.war.badMsg(player, "Can't destroy this.");
War.war.badMsg(player, "build.denied.location");
event.setCancelled(true);
return;
}
@ -448,7 +413,7 @@ public class WarBlockListener implements Listener {
// protect the hub
if (War.war.getWarHub() != null && War.war.getWarHub().getVolume().contains(block)) {
War.war.badMsg(player, "Can't destroy this.");
War.war.badMsg(player, "build.denied.location");
event.setCancelled(true);
return;
}
@ -457,7 +422,7 @@ public class WarBlockListener implements Listener {
Warzone blockZone = Warzone.getZoneByLocation(new Location(block.getWorld(), block.getX(), block.getY(), block.getZ()));
if (blockZone == null && War.war.getWarConfig().getBoolean(WarConfig.BUILDINZONESONLY) && !War.war.canBuildOutsideZone(player)) {
if (!War.war.getWarConfig().getBoolean(WarConfig.DISABLEBUILDMESSAGE)) {
War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside.");
War.war.badMsg(player, "build.denied.outside");
}
event.setCancelled(true);
return;
@ -466,7 +431,7 @@ public class WarBlockListener implements Listener {
// unbreakableZoneBlocks
if (blockZone != null && blockZone.getWarzoneConfig().getBoolean(WarzoneConfig.UNBREAKABLE) && (!isZoneMaker || (isZoneMaker && team != null))) {
// if the zone is unbreakable, no one but zone makers can break blocks (even then, zone makers in a team can't break blocks
War.war.badMsg(player, "The blocks in this zone are unbreakable!");
War.war.badMsg(player, "build.denied.zone.break");
event.setCancelled(true);
return;
}

View File

@ -86,25 +86,25 @@ public class WarEntityListener implements Listener {
LoadoutSelection defenderLoadoutState = defenderWarzone.getLoadoutSelections().get(d.getName());
if (defenderLoadoutState != null && defenderLoadoutState.isStillInSpawn()) {
War.war.badMsg(a, "The target is still in spawn!");
War.war.badMsg(a, "pvp.target.spawn");
event.setCancelled(true);
return;
}
LoadoutSelection attackerLoadoutState = attackerWarzone.getLoadoutSelections().get(a.getName());
if (attackerLoadoutState != null && attackerLoadoutState.isStillInSpawn()) {
War.war.badMsg(a, "You can't attack while still in spawn!");
War.war.badMsg(a, "pvp.self.spawn");
event.setCancelled(true);
return;
}
// Make sure none of them are locked in by respawn timer
if (defenderWarzone.isRespawning(d)) {
War.war.badMsg(a, "The target is currently respawning!");
War.war.badMsg(a, "pvp.target.respawn");
event.setCancelled(true);
return;
} else if (attackerWarzone.isRespawning(a)) {
War.war.badMsg(a, "You can't attack while respawning!");
War.war.badMsg(a, "pvp.self.respawn");
event.setCancelled(true);
return;
}
@ -114,10 +114,6 @@ public class WarEntityListener implements Listener {
event.setCancelled(true);
return;
}
if (attackerTeam != null && defenderTeam != null && attacker.getEntityId() == defender.getEntityId()) {
War.war.badMsg(a, "You hit yourself!");
}
// Detect death, prevent it and respawn the player
if (event.getDamage() >= d.getHealth()) {
@ -130,40 +126,32 @@ public class WarEntityListener implements Listener {
}
if (attackerWarzone.getWarzoneConfig().getBoolean(WarzoneConfig.DEATHMESSAGES)) {
String killMessage = "";
String attackerString = attackerTeam.getKind().getColor() + a.getName();
String defenderString = defenderTeam.getKind().getColor() + d.getName();
if (attacker.getEntityId() != defender.getEntityId()) {
Material killerWeapon = a.getItemInHand().getType();
String weaponString = killerWeapon.toString();
if (a.getItemInHand().hasItemMeta() && a.getItemInHand().getItemMeta().hasDisplayName()) {
weaponString = a.getItemInHand().getItemMeta().getDisplayName();
}
if (killerWeapon == Material.AIR) {
weaponString = "hand";
weaponString = War.war.getString("pvp.kill.weapon.hand");
} else if (killerWeapon == Material.BOW || event.getDamager() instanceof Arrow) {
int rand = killSeed.nextInt(3);
if (rand == 0) {
weaponString = "arrow";
} else if (rand == 1) {
weaponString = "bow";
weaponString = War.war.getString("pvp.kill.weapon.bow");
} else {
weaponString = "aim";
weaponString = War.war.getString("pvp.kill.weapon.aim");
}
} else if (event.getDamager() instanceof Projectile) {
weaponString = "aim";
weaponString = War.war.getString("pvp.kill.weapon.aim");
}
String adjectiveString = War.war.getDeadlyAdjectives().get(this.killSeed.nextInt(War.war.getDeadlyAdjectives().size()));
String verbString = War.war.getKillerVerbs().get(this.killSeed.nextInt(War.war.getKillerVerbs().size()));
killMessage = attackerString + ChatColor.WHITE + "'s " + adjectiveString + weaponString.toLowerCase().replace('_', ' ')
+ " " + verbString + " " + defenderString;
defenderWarzone.broadcast("pvp.kill.format", attackerString + ChatColor.WHITE, adjectiveString,
weaponString.toLowerCase().replace('_', ' '), verbString, defenderString);
} else {
killMessage = defenderString + ChatColor.WHITE + " committed accidental suicide";
}
for (Team team : defenderWarzone.getTeams()) {
team.teamcast(killMessage);
defenderWarzone.broadcast("pvp.kill.self", defenderString + ChatColor.WHITE);
}
}
if (attacker.getEntityId() != defender.getEntityId()) {
@ -226,38 +214,37 @@ public class WarEntityListener implements Listener {
}
}
t.teamcast(attackerTeam.getKind().getColor() + a.getName() + ChatColor.WHITE
+ " made " + defenderTeam.getKind().getColor() + d.getName() + ChatColor.WHITE + " blow up!");
t.teamcast("pvp.kill.bomb", attackerTeam.getKind().getColor() + a.getName() + ChatColor.WHITE,
defenderTeam.getKind().getColor() + d.getName() + ChatColor.WHITE);
}
}
} else if (attackerTeam != null && defenderTeam != null && attackerTeam == defenderTeam && attackerWarzone == defenderWarzone && attacker.getEntityId() != defender.getEntityId()) {
// same team, but not same person
if (attackerWarzone.getWarzoneConfig().getBoolean(WarzoneConfig.FRIENDLYFIRE)) {
War.war.badMsg(a, "Friendly fire is on! Please, don't hurt your teammates."); // if ff is on, let the attack go through
War.war.badMsg(a, "pvp.ff.enabled"); // if ff is on, let the attack go through
} else {
War.war.badMsg(a, "Your attack missed! Your target is on your team.");
War.war.badMsg(a, "pvp.ff.disabled");
event.setCancelled(true); // ff is off
}
} else if (attackerTeam == null && defenderTeam == null && War.war.canPvpOutsideZones(a)) {
// let normal PVP through is its not turned off or if you have perms
} else if (attackerTeam == null && defenderTeam == null && !War.war.canPvpOutsideZones(a)) {
if (!War.war.getWarConfig().getBoolean(WarConfig.DISABLEPVPMESSAGE)) {
War.war.badMsg(a, "You need the 'war.pvp' permission to attack players outside warzones.");
War.war.badMsg(a, "pvp.outside.permission");
}
event.setCancelled(true); // global pvp is off
} else {
War.war.badMsg(a, "Your attack missed!");
if (attackerTeam == null) {
War.war.badMsg(a, "You must join a team, then you'll be able to damage people " + "in the other teams in that warzone.");
War.war.badMsg(a, "pvp.self.notplaying");
} else if (defenderTeam == null) {
War.war.badMsg(a, "Your target is not in a team.");
War.war.badMsg(a, "pvp.target.notplaying");
} else if (attacker != null && defender != null && attacker.getEntityId() == defender.getEntityId()) {
// You just hit yourself, probably with a bouncing arrow
} else if (attackerTeam == defenderTeam) {
War.war.badMsg(a, "Your target is on your team.");
War.war.badMsg(a, "pvp.ff.disabled");
} else if (attackerWarzone != defenderWarzone) {
War.war.badMsg(a, "Your target is playing in another warzone.");
War.war.badMsg(a, "pvp.target.otherzone");
}
event.setCancelled(true); // can't attack someone inside a warzone if you're not in a team
}
@ -276,16 +263,11 @@ public class WarEntityListener implements Listener {
}
if (defenderWarzone.getWarzoneConfig().getBoolean(WarzoneConfig.DEATHMESSAGES)) {
String deathMessage = "";
String defenderString = Team.getTeamByPlayerName(d.getName()).getKind().getColor() + d.getName();
if (event.getDamager() instanceof TNTPrimed) {
deathMessage = defenderString + ChatColor.WHITE + " exploded";
defenderWarzone.broadcast("pvp.death.explosion", defenderString + ChatColor.WHITE);
} else {
deathMessage = defenderString + ChatColor.WHITE + " died";
}
for (Team team : defenderWarzone.getTeams()) {
team.teamcast(deathMessage);
defenderWarzone.broadcast("pvp.death.other", defenderString + ChatColor.WHITE);
}
}
WarPlayerDeathEvent event1 = new WarPlayerDeathEvent(defenderWarzone, d, null, event.getCause());
@ -423,19 +405,16 @@ public class WarEntityListener implements Listener {
// Detect death, prevent it and respawn the player
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.DEATHMESSAGES)) {
String deathMessage = "";
String cause = " died";
String playerName = Team.getTeamByPlayerName(player.getName()).getKind().getColor() + player.getName() + ChatColor.WHITE;
if (event.getCause() == DamageCause.FIRE || event.getCause() == DamageCause.FIRE_TICK
|| event.getCause() == DamageCause.LAVA || event.getCause() == DamageCause.LIGHTNING) {
cause = " burned to a crisp";
zone.broadcast("pvp.death.fire", playerName);
} else if (event.getCause() == DamageCause.DROWNING) {
cause = " drowned";
zone.broadcast("pvp.death.drown", playerName);
} else if (event.getCause() == DamageCause.FALL) {
cause = " fell to an untimely death";
}
deathMessage = Team.getTeamByPlayerName(player.getName()).getKind().getColor() + player.getName() + ChatColor.WHITE + cause;
for (Team teamToMsg : zone.getTeams()) {
teamToMsg.teamcast(deathMessage);
zone.broadcast("pvp.death.fall", playerName);
} else {
zone.broadcast("pvp.death.other", playerName);
}
}
WarPlayerDeathEvent event1 = new WarPlayerDeathEvent(zone, player, null, event.getCause());
@ -552,9 +531,7 @@ public class WarEntityListener implements Listener {
zone.handleDeath(player);
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.DEATHMESSAGES)) {
for (Team team : zone.getTeams()) {
team.teamcast(player.getName() + " died");
}
zone.broadcast("pvp.death.other", player.getName());
}
}
}
@ -613,7 +590,7 @@ public class WarEntityListener implements Listener {
if (zone != null) {
if (War.war.getKillstreakReward().getAirstrikePlayers().remove(player.getName())) {
event.getEntity().setMetadata("warAirstrike", new FixedMetadataValue(War.war, true));
team.teamcast(String.format("%s called in an airstrike!", team.getKind().getColor() + player.getName() + ChatColor.WHITE));
zone.broadcast("zone.airstrike", team.getKind().getColor() + player.getName() + ChatColor.WHITE);
}
}
}

View File

@ -87,18 +87,18 @@ public class WarPlayerListener implements Listener {
if (zone.isFlagThief(player.getName())) {
// a flag thief can't drop his flag
War.war.badMsg(player, "Can't drop items while stealing flag. What are you doing?! Run!");
War.war.badMsg(player, "drop.flag.disabled");
event.setCancelled(true);
} else if (zone.isBombThief(player.getName())) {
// a bomb thief can't drop his bomb
War.war.badMsg(player, "Can't drop items while stealing bomb. What are you doing?! Run for your enemy's spawn!");
War.war.badMsg(player, "drop.bomb.disabled");
event.setCancelled(true);
} else if (zone.isCakeThief(player.getName())) {
// a cake thief can't drop his cake
War.war.badMsg(player, "Can't drop items while stealing cake. What are you doing?! Run!");
War.war.badMsg(player, "drop.cake.disabled");
event.setCancelled(true);
} else if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.NODROPS)) {
War.war.badMsg(player, "Can't drop items in this warzone.");
War.war.badMsg(player, "drop.item.disabled");
event.setCancelled(true);
} else {
Item item = event.getItemDrop();
@ -106,13 +106,13 @@ public class WarPlayerListener implements Listener {
ItemStack itemStack = item.getItemStack();
if (itemStack != null && itemStack.getType() == team.getKind().getMaterial() && itemStack.getData() == team.getKind().getBlockData()) {
// Can't drop your team's kind block
War.war.badMsg(player, "Can't drop " + team.getName() + " blocks.");
War.war.badMsg(player, "drop.team", team.getName());
event.setCancelled(true);
return;
}
if (zone.isNearWall(player.getLocation()) && itemStack != null) {
War.war.badMsg(player, "Can't drop items near the zone border!");
War.war.badMsg(player, "drop.item.border");
event.setCancelled(true);
return;
}
@ -120,7 +120,7 @@ public class WarPlayerListener implements Listener {
if (zone.getLoadoutSelections().keySet().contains(player.getName())
&& zone.getLoadoutSelections().get(player.getName()).isStillInSpawn()) {
// still at spawn
War.war.badMsg(player, "Can't drop items while still in spawn.");
War.war.badMsg(player, "drop.item.spawn");
event.setCancelled(true);
return;
}
@ -133,7 +133,7 @@ public class WarPlayerListener implements Listener {
if (item.getItemStack().getType() == Material.WOOD_SWORD) {
String zoneName = War.war.getWandBearerZone(player);
War.war.removeWandBearer(player);
War.war.msg(player, "You dropped the zone " + zoneName + " wand.");
War.war.msg(player, "drop.wand", zoneName);
}
}
}
@ -183,7 +183,7 @@ public class WarPlayerListener implements Listener {
}
}
War.war.badMsg(player, "Can't use anything but War commands (e.g. /leave, /warhub) while you're playing in a warzone.");
War.war.badMsg(player, "command.disabled");
event.setCancelled(true);
}
}
@ -213,7 +213,7 @@ public class WarPlayerListener implements Listener {
String zoneName = War.war.getWandBearerZone(player);
ZoneSetter setter = new ZoneSetter(player, zoneName);
if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
War.war.badMsg(player, "Too far.");
War.war.badMsg(player, "wand.toofar");
} else if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
setter.placeCorner1(event.getClickedBlock());
event.setUseItemInHand(Result.ALLOW);
@ -228,25 +228,25 @@ public class WarPlayerListener implements Listener {
&& zone.getLoadoutSelections().get(player.getName()).isStillInSpawn()) {
event.setUseItemInHand(Result.DENY);
event.setCancelled(true);
War.war.badMsg(player, "Can't use items while still in spawn.");
War.war.badMsg(player, "use.item.spawn");
}
if (zone != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.ENDER_CHEST) {
event.setCancelled(true);
War.war.badMsg(player, "Can't use ender chests while playing in a warzone!");
War.war.badMsg(player, "use.ender");
}
Team team = Team.getTeamByPlayerName(player.getName());
if (team != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.ENCHANTMENT_TABLE && team.getTeamConfig().resolveBoolean(TeamConfig.XPKILLMETER)) {
event.setCancelled(true);
War.war.badMsg(player, "Can't use enchantment tables in this warzone!");
War.war.badMsg(player, "use.enchant");
if (zone.getAuthors().contains(player.getName())) {
War.war.badMsg(player, "This is due to the xpkillmeter option being enabled.");
War.war.badMsg(player, "use.xpkillmeter");
}
}
if (team != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.ANVIL && team.getTeamConfig().resolveBoolean(TeamConfig.XPKILLMETER)) {
event.setCancelled(true);
War.war.badMsg(player, "Can't use anvils in this warzone!");
War.war.badMsg(player, "use.anvil");
if (zone.getAuthors().contains(player.getName())) {
War.war.badMsg(player, "This is due to the xpkillmeter option being enabled.");
War.war.badMsg(player, "use.xpkillmeter");
}
}
}
@ -332,7 +332,7 @@ public class WarPlayerListener implements Listener {
this.handleDisabledZone(event, player, zone);
} else if (!zone.getWarzoneConfig().getBoolean(WarzoneConfig.JOINMIDBATTLE) && zone.isEnoughPlayers()) {
event.setTo(zone.getTeleport());
War.war.badMsg(player, "You cannot join a battle in progress in this warzone.");
War.war.badMsg(player, "join.progress");
} else {
this.dropFromOldTeamIfAny(player);
int noOfPlayers = 0;
@ -346,7 +346,7 @@ public class WarPlayerListener implements Listener {
boolean assigned = zone.autoAssign(player) != null ? true : false;
if (!assigned) {
event.setTo(zone.getTeleport());
War.war.badMsg(player, "You don't have permission for any of the available teams in this warzone");
War.war.badMsg(player, "join.permission.all");
}
if (War.war.getWarHub() != null && assigned) {
@ -354,8 +354,7 @@ public class WarPlayerListener implements Listener {
}
} else {
event.setTo(zone.getTeleport());
// player.teleport(zone.getTeleport());
War.war.badMsg(player, "All teams are full.");
War.war.badMsg(player, "join.full.all");
}
}
return;
@ -369,7 +368,7 @@ public class WarPlayerListener implements Listener {
this.handleDisabledZone(event, player, zone);
} else if (!zone.getWarzoneConfig().getBoolean(WarzoneConfig.JOINMIDBATTLE) && zone.isEnoughPlayers()) {
event.setTo(zone.getTeleport());
War.war.badMsg(player, "You cannot join a battle in progress in this warzone.");
War.war.badMsg(player, "join.progress");
} else if (team.getPlayers().size() < team.getTeamConfig().resolveInt(TeamConfig.TEAMSIZE)
&& War.war.canPlayWar(player, team)) {
if (player.getWorld() != zone.getWorld()) {
@ -381,17 +380,15 @@ public class WarPlayerListener implements Listener {
War.war.getWarHub().resetZoneSign(zone);
}
zone.keepPlayerState(player);
War.war.msg(player, "Your inventory is in storage until you exit with '/war leave'.");
War.war.msg(player, "join.inventorystored");
zone.respawnPlayer(event, team, player);
for (Team t : zone.getTeams()) {
t.teamcast("" + player.getName() + " joined team " + team.getName() + ".");
}
zone.broadcast("join.broadcast", player.getName(), team.getName());
} else if (!War.war.canPlayWar(player, team)) {
event.setTo(zone.getTeleport());
War.war.badMsg(player, "You don't have permission to join team " + team.getName());
War.war.badMsg(player, "join.permission.single", team.getName());
} else {
event.setTo(zone.getTeleport());
War.war.badMsg(player, "Team " + team.getName() + " is full.");
War.war.badMsg(player, "join.full.single", team.getName());
}
return;
}
@ -401,7 +398,7 @@ public class WarPlayerListener implements Listener {
this.dropFromOldTeamIfAny(player);
event.setTo(War.war.getWarHub().getLocation());
// player.teleport(war.getWarHub().getLocation());
War.war.msg(player, "Welcome to the War hub.");
War.war.msg(player, "warhub.teleport");
return;
}
}
@ -418,10 +415,10 @@ public class WarPlayerListener implements Listener {
&& zone.getTeams().size() >= 1) {
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.DISABLED)) {
event.setTo(hub.getLocation());
War.war.badMsg(player, "This warzone is disabled.");
War.war.badMsg(player, "join.disabled");
} else if (!zone.getWarzoneConfig().getBoolean(WarzoneConfig.JOINMIDBATTLE) && zone.isEnoughPlayers()) {
event.setTo(hub.getLocation());
War.war.badMsg(player, "You cannot join a battle in progress in this warzone.");
War.war.badMsg(player, "join.progress");
} else {
this.dropFromOldTeamIfAny(player);
int noOfPlayers = 0;
@ -435,7 +432,7 @@ public class WarPlayerListener implements Listener {
boolean assigned = zone.autoAssign(player) != null ? true : false;
if (!assigned) {
event.setTo(hub.getLocation());
War.war.badMsg(player, "You don't have permission for any of the available teams in this warzone");
War.war.badMsg(player, "join.permission.all");
}
if (War.war.getWarHub() != null && assigned) {
@ -443,13 +440,13 @@ public class WarPlayerListener implements Listener {
}
} else {
event.setTo(hub.getLocation());
War.war.badMsg(player, "All teams are full.");
War.war.badMsg(player, "join.full.all");
}
}
return;
}
event.setTo(zone.getTeleport());
War.war.msg(player, "Welcome to warzone " + zone.getName() + ".");
War.war.msg(player, "zone.teleport", zone.getName());
return;
}
}
@ -473,7 +470,7 @@ public class WarPlayerListener implements Listener {
if (locZone == null && playerTeam != null && playerWarzone.getLobby() != null && !playerWarzone.getLobby().getVolume().contains(playerLoc) && !isLeaving) {
List<BlockFace> nearestWalls = playerWarzone.getNearestWalls(playerLoc);
if (!playerWarzone.getWarzoneConfig().getBoolean(WarzoneConfig.REALDEATHS)) {
War.war.badMsg(player, "Use /leave (or /war leave) to exit the zone.");
War.war.badMsg(player, "zone.leavenotice");
}
if(nearestWalls != null && nearestWalls.size() > 0) {
// First, try to bump the player back in
@ -525,10 +522,7 @@ public class WarPlayerListener implements Listener {
// Bring back flag of victim team
victimTeam.getFlagVolume().resetBlocks();
victimTeam.initializeTeamFlag();
for (Team team : playerWarzone.getTeams()) {
team.teamcast(player.getName() + " dropped the " + victimTeam.getName() + " flag!");
}
playerWarzone.broadcast("drop.flag.broadcast", player.getName(), victimTeam.getName());
return;
} else if (playerWarzone.isCakeThief(player.getName())) {
Cake cake = playerWarzone.getCakeForThief(player.getName());
@ -541,9 +535,7 @@ public class WarPlayerListener implements Listener {
cake.getVolume().resetBlocks();
cake.addCakeBlocks();
for (Team team : playerWarzone.getTeams()) {
team.teamcast(player.getName() + " dropped the " + cake.getName() + " cake!");
}
playerWarzone.broadcast("drop.cake.broadcast", player.getName(), cake.getName());
return;
} else if (playerWarzone.isBombThief(player.getName())) {
Bomb bomb = playerWarzone.getBombForThief(player.getName());
@ -556,9 +548,7 @@ public class WarPlayerListener implements Listener {
bomb.getVolume().resetBlocks();
bomb.addBombBlocks();
for (Team team : playerWarzone.getTeams()) {
team.teamcast(player.getName() + " dropped the " + bomb.getName() + " bomb!");
}
playerWarzone.broadcast("drop.bomb.broadcast", player.getName(), bomb.getName());
return;
} else {
// Get player back to spawn
@ -573,18 +563,14 @@ public class WarPlayerListener implements Listener {
if (!playerWarzone.isEnoughPlayers() && loadoutSelectionState != null && loadoutSelectionState.isStillInSpawn()) {
// Be sure to keep only players that just respawned locked inside the spawn for minplayer/minteams restrictions - otherwise
// this will conflict with the can't-renter-spawn bump just a few lines below
War.war.badMsg(player, "Can't leave spawn until there's a minimum of " + playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINPLAYERS)
+" player(s) on at least " + playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINTEAMS) + " team(s).");
War.war.badMsg(player, "zone.spawn.minplayers", playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINPLAYERS),
playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINTEAMS));
event.setTo(playerTeam.getRandomSpawn());
return;
}
if (playerWarzone.isRespawning(player)) {
int rt = playerTeam.getTeamConfig().resolveInt(TeamConfig.RESPAWNTIMER);
String isS = "s";
if (rt == 1) {
isS = "";
}
War.war.badMsg(player, "Can't leave spawn for " + rt + " second" + isS + " after spawning!");
War.war.badMsg(player, "zone.spawn.timer", rt);
event.setTo(playerTeam.getRandomSpawn());
return;
}
@ -606,21 +592,12 @@ public class WarPlayerListener implements Listener {
// Monuments
if (playerTeam != null && playerWarzone.nearAnyOwnedMonument(playerLoc, playerTeam) && player.getHealth() < 20 && player.getHealth() > 0 // don't heal the dead
&& this.random.nextInt(7) == 3) { // one chance out of many of getting healed
double currentHp = player.getHealth();
double newHp = Math.min(20, currentHp + locZone.getWarzoneConfig().getInt(WarzoneConfig.MONUMENTHEAL));
int currentHp = (int) player.getHealth();
int newHp = Math.min(20, currentHp + locZone.getWarzoneConfig().getInt(WarzoneConfig.MONUMENTHEAL));
player.setHealth(newHp);
String isS = "s";
String heartNum = ""; // since (newHp-currentHp)/2 won't give the right amount
if (newHp - currentHp == 2) { // no 's' in 'hearts' when it's just one heart
isS = "";
heartNum = "one ";
} else if (newHp - currentHp % 2 == 0) {
heartNum = ((newHp - currentHp) / 2) + " ";
} else {
heartNum = ((newHp - currentHp - 1) / 2) + ".5 ";
}
War.war.msg(player, "Your dance pleases the monument's voodoo. You gain " + heartNum + "heart" + isS + "!");
double heartNum = ((double) newHp - currentHp) / 2;
War.war.msg(player, "zone.monument.voodoo", heartNum);
return;
}
@ -643,14 +620,14 @@ public class WarPlayerListener implements Listener {
}
} else if (playerTeam.getTeamConfig().resolveFlagReturn().equals(FlagReturn.SPAWN)) {
if (inFlag) {
War.war.badMsg(player, "You have to capture the enemy flag at your team's spawn.");
War.war.badMsg(player, "zone.flagreturn.spawn");
return;
} else if (!inSpawn) {
return;
}
} else if (playerTeam.getTeamConfig().resolveFlagReturn().equals(FlagReturn.FLAG)) {
if (inSpawn) {
War.war.badMsg(player, "You have to capture the enemy flag at your team's flag.");
War.war.badMsg(player, "zone.flagreturn.flag");
return;
} else if (!inFlag) {
return;
@ -664,7 +641,7 @@ public class WarPlayerListener implements Listener {
}
if (playerWarzone.isTeamFlagStolen(playerTeam) && playerTeam.getTeamConfig().resolveBoolean(TeamConfig.FLAGMUSTBEHOME)) {
War.war.badMsg(player, "You can't capture the enemy flag until your team's flag is returned.");
War.war.badMsg(player, "zone.flagreturn.deadlock");
} else {
// flags can be captured at own spawn or own flag pole
if (playerWarzone.isReinitializing()) {
@ -690,8 +667,8 @@ public class WarPlayerListener implements Listener {
}
}
}
t.teamcast(playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE
+ " captured team " + victim.getName() + "'s flag. Team " + playerTeam.getName() + " scores one point.");
t.teamcast("zone.flagcapture.broadcast", playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE,
victim.getName(), playerTeam.getName());
}
// Detect win conditions
@ -770,8 +747,8 @@ public class WarPlayerListener implements Listener {
}
}
}
t.teamcast(playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE
+ " blew up team " + victim.getName() + "'s spawn. Team " + playerTeam.getName() + " scores one point.");
t.teamcast("zone.bomb.broadcast", playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE,
victim.getName(), playerTeam.getName());
}
// Detect win conditions
@ -855,9 +832,8 @@ public class WarPlayerListener implements Listener {
}
}
}
t.teamcast(playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE
+ " captured cake " + ChatColor.GREEN + cake.getName() + ChatColor.WHITE + ". Team " + playerTeam.getName() + " scores one point and gets a full lifepool.");
t.teamcast("zone.cake.broadcast", playerTeam.getKind().getColor() + player.getName() + ChatColor.WHITE,
ChatColor.GREEN + cake.getName() + ChatColor.WHITE, playerTeam.getName());
}
// Detect win conditions
@ -898,7 +874,7 @@ public class WarPlayerListener implements Listener {
// player is not in any team, but inside warzone boundaries, get him out
Warzone zone = Warzone.getZoneByLocation(playerLoc);
event.setTo(zone.getTeleport());
War.war.badMsg(player, "You can't be inside a warzone without a team.");
War.war.badMsg(player, "zone.noteamnotice");
return;
}
}
@ -929,7 +905,7 @@ public class WarPlayerListener implements Listener {
playerWarzone.equipPlayerLoadoutSelection(event.getPlayer(), playerTeam, false, true);
} else {
War.war.badMsg(event.getPlayer(), "Can't change loadout after exiting the spawn.");
War.war.badMsg(event.getPlayer(), "zone.loadout.reenter");
}
}
}
@ -983,9 +959,7 @@ public class WarPlayerListener implements Listener {
victimTeam.getFlagVolume().resetBlocks();
victimTeam.initializeTeamFlag();
for (Team team : playerWarzone.getTeams()) {
team.teamcast(event.getPlayer().getName() + " dropped the " + victimTeam.getName() + " flag!");
}
playerWarzone.broadcast("drop.flag.broadcast", event.getPlayer().getName(), victimTeam.getName());
} else if (playerWarzone.isCakeThief(event.getPlayer().getName())) {
Cake cake = playerWarzone.getCakeForThief(event.getPlayer().getName());
@ -997,9 +971,7 @@ public class WarPlayerListener implements Listener {
cake.getVolume().resetBlocks();
cake.addCakeBlocks();
for (Team team : playerWarzone.getTeams()) {
team.teamcast(event.getPlayer().getName() + " dropped the " + cake.getName() + " cake!");
}
playerWarzone.broadcast("drop.cake.broadcast", event.getPlayer().getName(), cake.getName());
} else if (playerWarzone.isBombThief(event.getPlayer().getName())) {
Bomb bomb = playerWarzone.getBombForThief(event.getPlayer().getName());
@ -1011,9 +983,7 @@ public class WarPlayerListener implements Listener {
bomb.getVolume().resetBlocks();
bomb.addBombBlocks();
for (Team team : playerWarzone.getTeams()) {
team.teamcast(event.getPlayer().getName() + " dropped the " + bomb.getName() + " bomb!");
}
playerWarzone.broadcast("drop.bomb.broadcast", event.getPlayer().getName(), bomb.getName());
} else {
// Get event.getPlayer() back to spawn
playerWarzone.respawnPlayer(event, playerTeam, event.getPlayer());
@ -1039,7 +1009,7 @@ public class WarPlayerListener implements Listener {
private void handleDisabledZone(PlayerMoveEvent event, Player player, Warzone zone) {
if (zone.getLobby() != null) {
War.war.badMsg(player, "This warzone is disabled.");
War.war.badMsg(player, "join.disabled");
event.setTo(zone.getTeleport());
}
}

View File

@ -216,7 +216,7 @@ public class WarHub {
// War hub sign
locationBlock.getRelative(front, 2).setType(Material.SIGN_POST);
String[] lines = "War hub\n(/warhub)\nPick your\nbattle!".split("\n");
String[] lines = War.war.getString("sign.warhub").split("\n");
org.bukkit.block.Sign locationBlockFront = (org.bukkit.block.Sign) locationBlock.getRelative(front, 2).getState();
for (int i = 0; i < 4; i++) {
locationBlockFront.setLine(i, lines[i]);
@ -271,7 +271,7 @@ public class WarHub {
zoneCap += t.getTeamConfig().resolveInt(TeamConfig.TEAMSIZE);
}
String[] lines = MessageFormat.format(
"Warzone\n{0}\n{1}/{2} players\n{3} teams",
War.war.getString("sign.warzone"),
zone.getName(), zonePlayers, zoneCap,
zone.getTeams().size()).split("\n");
for (int i = 0; i < 4; i++) {

View File

@ -292,7 +292,7 @@ public class ZoneLobby {
Block linkGateBlock = BlockInfo.getBlock(this.volume.getWorld(), this.warHubLinkGate);
this.placeWarhubLinkGate(linkGateBlock, warzone.getLobbyMaterials().getGateBlock());
// add warhub sign
String[] lines = "\nTo War hub\n\n ".split("\n");
String[] lines = War.war.getString("sign.lobby.warhub").split("\n");
this.resetGateSign(linkGateBlock, lines, false);
}
@ -367,9 +367,9 @@ public class ZoneLobby {
block.setData(data);
String[] lines = new String[4];
if (this.autoAssignGate != null) {
lines = MessageFormat.format("Warzone\n{0}\nEnter the auto-\nassign gate.", warzone.getName()).split("\n");
lines = MessageFormat.format(War.war.getString("sign.lobby.autoassign"), warzone.getName()).split("\n");
} else {
lines = MessageFormat.format("Warzone\n{0}\n\nPick your team.", warzone.getName()).split("\n");
lines = MessageFormat.format(War.war.getString("sign.lobby.pick"), warzone.getName()).split("\n");
}
for (int i = 0; i < 4; i++) {
block.setLine(i, lines[i]);
@ -700,7 +700,7 @@ public class ZoneLobby {
String[] lines;
if (team.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL) == -1) {
lines = MessageFormat
.format("Team {0}\n{1}/{2} players\n{3}/{4} pts\nunlimited lives",
.format(War.war.getString("sign.team.unlimited"),
team.getName(),
team.getPlayers().size(),
team.getTeamConfig().resolveInt(
@ -710,7 +710,7 @@ public class ZoneLobby {
TeamConfig.MAXSCORE)).split("\n");
} else {
lines = MessageFormat
.format("Team {0}\n{1}/{2} players\n{3}/{4} pts\n{5} lives left",
.format(War.war.getString("sign.team.limited"),
team.getName(),
team.getPlayers().size(),
team.getTeamConfig().resolveInt(

View File

@ -0,0 +1,136 @@
#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
build.denied.location = You can't build here.
build.denied.outside = You can only build inside warzones.
build.denied.teamblock = You can only use your team's blocks to capture monuments.
build.denied.zone.break = The blocks in this warzone are unbreakable!
build.denied.zone.multteam = You already have a {0} block.
build.denied.zone.outside = You can't destroy a warzone you are not playing in.
build.denied.zone.place = The blocks in this warzone are unbreakable - this also means you can't build!
command.console = You can't do this if you are not in game.
command.disabled = You can only use War commands (e.g. /leave) while playing.
drop.bomb.broadcast = {0} dropped the {1} bomb!
drop.bomb.disabled = You can't drop items while stealing bomb. What are you doing?! Run for your enemy's spawn!
drop.cake.broadcast = {0} dropped the {1} cake!
drop.cake.disabled = You can't drop items while stealing cake. What are you doing?! Run!
drop.flag.broadcast = {0} dropped the {1} flag!
drop.flag.disabled = You can't drop items while stealing flag. What are you doing?! Run!
drop.item.border = You can't drop items near the zone border.
drop.item.disabled = You can't drop items in this warzone.
drop.item.spawn = You can't drop items while you are still in spawn.
drop.team = You can''t drop {0} blocks.
drop.wand = You dropped the zone {0} wand.
join.aarequired = This warzone requires you to be automatically assigned to a team. Please enter the autoassign gate instead.
join.broadcast = {0} joined team {1}.
join.disabled = This warzone is disabled.
join.full.all = All teams are full.
join.full.single = Team {0} is full.
join.inventorystored = Your inventory is in storage until you exit with /war leave.
join.permission.all = You don't have permission for any of the available teams in this warzone.
join.permission.single = You don''t have permission to join team {0}.
join.progress = You can't join a battle in progress in this zone.
join.selfteam = You can't join your own team.
join.team404 = That team could not be found. Try using /teams for a list.
leave.broadcast = {0} left the zone.
leave.inventoryrestore = Your inventory is being restored.
pvp.death.drown = {0} drowned
pvp.death.explosion = {0} exploded
pvp.death.fall = {0} fell to an untimely death
pvp.death.fire = {0} burned to a crisp
pvp.death.other = {0} died
pvp.ff.disabled = Your attack missed! Your target is on your team.
pvp.ff.enabled = Friendly fire is on! Please, don't hurt your teammates.
pvp.kill.adjectives = ;;mighty;deadly;fine;precise;brutal;powerful
pvp.kill.bomb = {0} made {1} blow up!
pvp.kill.format = {0}''s {1} {2} {3} {4}
pvp.kill.self = {0} committed suicide
pvp.kill.verbs = killed;killed;killed;finished;annihilated;murdered;obliterated;exterminated
pvp.kill.weapon.aim = aim
pvp.kill.weapon.bow = bow
pvp.kill.weapon.hand = hand
pvp.outside.permission = You can't attack players outside warzones.
pvp.self.notplaying = You need to be playing in the warzone to attack.
pvp.self.respawn = You can't attack while respawning!
pvp.self.spawn = You can't attack while still in spawn!
pvp.target.notplaying = Your target is not playing in the warzone.
pvp.target.otherzone = Your target is playing in another warzone.
pvp.target.respawn = The target is currently respawning!
pvp.target.spawn = The target is still in spawn!
sign.lobby.autoassign = Warzone\n{0}\nEnter the auto-\nassign gate.
sign.lobby.pick = Warzone\n{0}\n\nPick your team.
sign.lobby.warhub = \nTo War hub\n\n
sign.team.limited = Team {0}\n{1}/{2} players\n{3}/{4} pts\n{5} lives left
sign.team.unlimited = Team {0}\n{1}/{2} players\n{3}/{4} pts\nunlimited lives
sign.warhub = War hub\n(/warhub)\nPick your\nbattle!
sign.warzone = Warzone\n{0}\n{1}/{2} players\n{3} teams
use.anvil = You can't use anvils in this warzone!
use.enchant = You can't use enchantment tables in this warzone!
use.ender = You can't use ender chests while playing in a warzone!
use.item.spawn = You can't use items while still in spawn.
use.xpkillmeter = This is due to the xpkillmeter option being enabled.
wand.toofar = Your target block is too far away.
war.notadmin = You can't do this if you are not a War admin (permission war.admin).
war.notzm = You can't do this if you are not a warzone maker (permission war.zonemaker).
war.prefix = War>
war.title = War
warhub.none = No warhub on this War server. Try /zones and /zone.
warhub.permission = You do not have permission to teleport to War hub.
warhub.teleport = Welcome to the WarHub. Choose your battle!
zone.airstrike = {0} called in an airstrike!
zone.battle.end = The battle is over. Team {0} lost: {1} died and there were no lives left in their life pool.
zone.battle.newscores = New scores - {0}
zone.battle.next = The battle was interrupted. Resetting warzone {0}...
zone.battle.reset = A new battle begins. Resetting warzone...
zone.bomb.broadcast = {0} blew up team {1}''s spawn. Team {2} scores one point.
zone.cake.broadcast = {0} captured cake {1}. Team {2} scores one point and gets a full lifepool.
zone.flagcapture.broadcast = {0} captured team {1}''s flag. Team {2} scores one point.
zone.flagreturn.deadlock = You can't capture the enemy flag until your team's flag is returned.
zone.flagreturn.flag = You have to capture the enemy flag at your team's flag.
zone.flagreturn.spawn = You have to capture the enemy flag at your team's spawn.
zone.leavenotice = Use /war leave to exit the zone.
zone.lifepool.empty = Team {0}''s life pool is empty. One more death and they lose the battle!
zone.loadout.equip = Equipped {0} loadout (sneak to switch).
zone.loadout.reenter = Can't change loadout after exiting the spawn.
zone.monument.badblock = You must capture a monument with a block of your team's wool color. Get one from your team spawn.
zone.monument.capture = Monument {0} has been captured by team {1}.
zone.monument.lose = Team {0} loses control of mounment {1}
zone.monument.voodoo = Your dance pleases the monument''s voodoo. You gain {0} heart(s)!
zone.noteamnotice = You can't be inside a warzone without a team.
zone.score.board404 = This warzone has not enabled a scoreboard.
zone.score.empty = You can't score until at least one player joins another team.
zone.spawn.minplayers = You can''t leave spawn until there''s a minimum of {0} player(s) on at least {1} team(s).
zone.spawn.timer = You can''t leave spawn for {0} second(s) after respawning!
zone.steal.bomb.broadcast = {0} has bomb {1}.
zone.steal.bomb.notice = You have bomb {0}. Reach another team's spawn to score. Don't get touched by anyone or you'll blow up!
zone.steal.bomb.prevent = Prevent {0} from reaching your spawn with the bomb!
zone.steal.cake.broadcast = {0} has cake {1}.
zone.steal.cake.notice = You have cake {0}. Reach your team''s spawn to score and replenish your lifepool.
zone.steal.cake.prevent = Prevent {0} from reaching their spawn with the cake!
zone.steal.flag.broadcast = {0} stole team {1}''s flag.
zone.steal.flag.empty = You can't steal team {0}'s flag since no players are on that team.
zone.steal.flag.notice = You have team {0}''s flag. Reach your team spawn or flag to capture it!
zone.steal.flag.prevent = Prevent {0} from reaching team {1}''s spawn or flag.
zone.stealextra.bomb = You can only steal one bomb at a time!
zone.stealextra.cake = You can only steal one cake at a time!
zone.stealextra.flag = You can only steal one flag at a time!
zone.stealextra.other = You can only steal one thing at a time!
zone.teaminfo.format = {0}: {1} points, {2}/{3} lives left. {4}
zone.teaminfo.none = none
zone.teaminfo.prefix = Teams:
zone.teleport = Welcome to warzone {0}.
zone.warp.permission = You do not have permission to teleport to the warzone.
zone.zone404 = The warzone could not be found.
zone.zoneinfo.format = {0}: {1} teams, {2} players
zone.zoneinfo.prefix = Warzones:
zone.zoneinfo.teleport = Use /zone <zone-name> to teleport to a warzone.

View File

@ -0,0 +1,117 @@
#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
#\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0442 AlexMerser
build.denied.location = \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0437\u0434\u0435\u0441\u044c
build.denied.outside = \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0435\u043d\u044b!
build.denied.teamblock = \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u043e\u043a\u0438 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u043c\u043e\u043d\u0443\u043c\u0435\u043d\u0442!
build.denied.zone.break = \u041d\u0430 \u044d\u0442\u043e\u0439 \u0430\u0440\u0435\u043d\u0435 \u0431\u043b\u043e\u043a\u0438 \u043d\u0435\u0440\u0430\u0437\u0440\u0443\u0448\u0438\u043c\u044b!
build.denied.zone.multteam = \u0412\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 {0} \u0431\u043b\u043e\u043a.
build.denied.zone.outside = \u041d\u0435\u043b\u044c\u0437\u044f \u043b\u043e\u043c\u0430\u0442\u044c \u0430\u0440\u0435\u043d\u0443, \u043d\u0435 \u0432\u043e\u0439\u0434\u044f \u0432 \u043d\u0435\u0435
build.denied.zone.place = \u0411\u043b\u043e\u043a\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u0435 \u043d\u0435\u0440\u0430\u0437\u0440\u0443\u0448\u0438\u043c\u044b\u0435 - \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f!
command.console = \u0412\u0432\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0433\u0440\u043e\u043a\u0443.
command.disabled = \u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u0440\u043e\u043c\u0435 /leave \u043f\u043e\u043a\u0430 \u0412\u044b \u043d\u0430 \u0430\u0440\u0435\u043d\u0435!
drop.bomb.broadcast = {0} \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0431\u043e\u043c\u0431\u0443 {1}
drop.bomb.disabled = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438, \u043f\u043e\u043a\u0430 \u0412\u044b \u043d\u0435\u0441\u0435\u0442\u0435 \u0431\u043e\u043c\u0431\u0443. \u0421\u043a\u043e\u0440\u0435\u0435 \u0431\u0435\u0433\u0438\u0442\u0435 \u043a \u0432\u0440\u0430\u0436\u0435\u0441\u043a\u043e\u0439 \u0431\u0430\u0437\u0435!
drop.cake.broadcast = {0} \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0442\u043e\u0440\u0442 {1}
drop.cake.disabled = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438, \u043f\u043e\u043a\u0430 \u0412\u044b \u043d\u0435\u0441\u0435\u0442\u0435 \u0442\u043e\u0440\u0442. \u0421\u043a\u043e\u0440\u0435\u0435 \u0431\u0435\u0433\u0438\u0442\u0435 \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u0435!
drop.flag.broadcast = {0} \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0444\u043b\u0430\u0433 {1}
drop.flag.disabled = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438, \u043f\u043e\u043a\u0430 \u0412\u044b \u043d\u0435\u0441\u0435\u0442\u0435 \u0444\u043b\u0430\u0433. \u0421\u043a\u043e\u0440\u0435\u0435 \u0431\u0435\u0433\u0438\u0442\u0435 \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u0435!
drop.item.border = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438, \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435 \u0430\u0440\u0435\u043d\u044b!
drop.item.disabled = \u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0430\u0440\u0435\u043d\u0435!
drop.item.spawn = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438 \u043d\u0430 \u0441\u043f\u0430\u0443\u043d\u0435!
drop.team = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c {0} \u0431\u043b\u043e\u043a\u0438
drop.wand = \u0412\u044b \u0432\u044b\u043a\u0438\u043d\u0443\u043b\u0438 \u043c\u0435\u0447 {0} \u0434\u043b\u044f \u0432\u044b\u0434\u0438\u043b\u0435\u043d\u0438\u044f \u0430\u0440\u0435\u043d\u044b!
join.broadcast = {0} \u0437\u0430\u0448\u0435\u043b \u0437\u0430 {1}.
join.disabled = \u042d\u0442\u0430 \u0430\u0440\u0435\u043d\u0430 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0430.
join.full.all = \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u044b!
join.full.single = \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0} \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0430!
join.inventorystored = \u0412\u0430\u0448 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c \u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438, \u043f\u043e\u043a\u0430 \u0412\u044b \u043d\u0435 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 /war leave
join.permission.single = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0439\u0442\u0438 \u043d\u0430 \u0430\u0440\u0435\u043d\u0443.
join.selfteam = \u041d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435.
join.team404 = \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 /teams, \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430
leave.broadcast = {0} \u0432\u044b\u0448\u0435\u043b \u0441 \u0430\u0440\u0435\u043d\u044b.
leave.inventoryrestore = \u0418\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.
pvp.death.drown = {0} \u0443\u0442\u043e\u043d\u0443\u043b
pvp.death.explosion = {0} \u0432\u0437\u043e\u0440\u0432\u0430\u043b\u0441\u044f
pvp.death.fall = {0} \u0443\u043f\u0430\u043b \u0432 \u0431\u0435\u0437\u0434\u043d\u0443
pvp.death.fire = {0} \u0441\u0433\u043e\u0440\u0435\u043b
pvp.death.other = {0} \u0443\u043c\u0435\u0440
pvp.ff.disabled = \u0418\u0433\u0440\u043e\u043a \u0432 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435!
pvp.ff.enabled = \u041e\u0433\u043e\u043d\u044c \u043f\u043e \u0441\u0432\u043e\u0438\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d. \u0411\u0443\u0434\u044c\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0439!
pvp.kill.bomb = {0} \u0432\u0437\u043e\u0440\u0432\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u0443 {1}
pvp.kill.self = {0} \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b \u0441\u0443\u0438\u0446\u0438\u0434
pvp.kill.weapon.aim = \u0445\u0435\u0434\u0448\u043e\u0442\u043e\u043c
pvp.kill.weapon.bow = \u043b\u0443\u043a\u043e\u043c
pvp.kill.weapon.hand = \u0440\u0443\u043a\u043e\u0439
pvp.outside.permission = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0433\u0440\u043e\u043a\u043e\u0432 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0430\u0440\u0435\u043d\u044b!
pvp.self.notplaying = \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043d\u0430 \u0430\u0440\u0435\u043d\u0435, \u0442\u043e\u0433\u0434\u0430 \u0412\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0434\u0435\u0439
pvp.self.respawn = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0440\u0435\u0441\u043f\u0430\u0443\u043d\u0438\u0442\u0435\u0441\u044c!
pvp.self.spawn = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0441\u0442\u043e\u0438\u0442\u0435 \u043d\u0430 \u0441\u043f\u0430\u0443\u043d\u0435!
pvp.target.notplaying = \u0418\u0433\u0440\u043e\u043a \u043d\u0435 \u043d\u0430 \u0430\u0440\u0435\u043d\u0435!
pvp.target.otherzone = \u0418\u0433\u0440\u043e\u043a \u0438\u0433\u0440\u0430\u0435\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0440\u0435\u043d\u0435!
pvp.target.respawn = \u0418\u0433\u0440\u043e\u043a \u0440\u0435\u0441\u043f\u0430\u0443\u043d\u0438\u0442\u0441\u044f!
pvp.target.spawn = \u0418\u0433\u0440\u043e\u043a \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u0441\u043f\u0430\u0443\u043d\u0435!
sign.lobby.autoassign = \u0410\u0440\u0435\u043d\u0430:\n{0}\n\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u0432\n\u043f\u043e\u0440\u0442\u0430\u043b
sign.lobby.pick = \u0410\u0440\u0435\u043d\u0430:\n{0}\n\n\u0412\u044b\u0431\u0435\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443
sign.lobby.warhub = \u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f\n\u043d\u0430\nWarhub\n
sign.team.limited = \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0}\n{1}/{2} \u0438\u0433\u0440\u043e\u043a\u043e\u0432\n{3}/{4} \u043e\u0447\u043a\u043e\u0432\n{5} \u0441\u043c\u0435\u0440\u0442\u0435\u0439
sign.team.unlimited = \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0}\n{1}/{2} \u0438\u0433\u0440\u043e\u043a\u043e\u0432\n{3}/{4} \u043e\u0447\u043a\u043e\u0432\n\u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0441\u043c\u0435\u0440\u0442\u0435\u0439
sign.warhub = War hub\n(/warhub)\n\u0412\u044b\u0431\u0435\u0440\u0438\n\u0430\u0440\u0435\u043d\u0443!
sign.warzone = \u0410\u0440\u0435\u043d\u0430:\n{0}\n{1}/{2} \u0438\u0433\u0440\u043e\u043a\u043e\u0432\n{3} \u043a\u043e\u043c\u0430\u043d\u0434
use.item.spawn = \u041d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0438 \u043d\u0430 \u0441\u043f\u0430\u0443\u043d\u0435!
wand.toofar = \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u0430\u043b\u0435\u043a\u043e
war.notadmin = \u0412\u0432\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 (\u043f\u0440\u0430\u0432\u043e: war.admin).
war.notzm = \u0412\u0432\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c \u0437\u043e\u043d\u044b (\u043f\u0440\u0430\u0432\u043e: war.zonemaker).
warhub.none = WarHub \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041f\u0440\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 /zones \u0438 /zone.
warhub.permission = \u0412\u0430\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u0441\u044f \u043d\u0430 WarHub.
warhub.teleport = \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043d\u0430 WarHub. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0430\u0440\u0435\u043d\u0443!
zone.battle.end = \u0411\u043e\u0439 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0} \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u043b\u0430: {1} \u0443\u043c\u0435\u0440 \u0438 \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u043c\u0435\u0440\u0442\u044c \u0438\u0437 \u0437\u0430\u043f\u0430\u0441\u0430!
zone.battle.newscores = \u041d\u043e\u0432\u044b\u0439 \u0440\u0435\u043a\u043e\u0440\u0434 - {0}
zone.battle.next = \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0443\u043d\u0434. \u0420\u0435\u0441\u0442\u0430\u0440\u0442 \u0430\u0440\u0435\u043d\u044b {0}...
zone.battle.reset = \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0431\u043e\u0439...
zone.bomb.broadcast = {0} \u043f\u043e\u0434\u043e\u0440\u0432\u0430\u043b \u0441\u043f\u0430\u0443\u043d {1}. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {2} \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 1 \u043e\u0447\u043a\u043e!
zone.cake.broadcast = {0} \u043f\u0440\u0438\u043d\u0435\u0441 \u0442\u043e\u0440\u0442 \u043a {1}. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {2} \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0447\u043a\u043e \u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u0437\u0430\u043f\u0430\u0441 \u0436\u0438\u0437\u043d\u0435\u0439!\n
zone.flagcapture.broadcast = {0} \u043f\u0440\u0438\u043d\u0435\u0441 \u0444\u043b\u0430\u0433 {1}. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {2} \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 1 \u043e\u0447\u043a\u043e!
zone.flagreturn.deadlock = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043d\u0435\u0441\u0442\u0438 \u0432\u0440\u0430\u0436\u0435\u0441\u043a\u0438\u0439 \u0444\u043b\u0430\u0433, \u043f\u043e\u043a\u0430 \u0412\u0430\u0448 \u0444\u043b\u0430\u0433 \u0443 \u0432\u0440\u0430\u0433\u0430!
zone.flagreturn.flag = \u0412\u044b \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0438 \u0432\u0440\u0430\u0436\u0435\u0441\u043a\u0438\u0439 \u0444\u043b\u0430\u0433 \u043a \u0444\u043b\u0430\u0433\u0443 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.
zone.flagreturn.spawn = \u0412\u044b \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0438 \u0432\u0440\u0430\u0436\u0435\u0441\u043a\u0438\u0439 \u0444\u043b\u0430\u0433 \u043d\u0430 \u0441\u0432\u043e\u044e \u0431\u0430\u0437\u0443!
zone.leavenotice = \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 /war leave, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0437\u043e\u043d\u044b
zone.lifepool.empty = \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0436\u0438\u0437\u043d\u0435\u0439 {0} \u043f\u043e\u0434\u043e\u0448\u043b\u043e \u043a \u043a\u043e\u043d\u0446\u0443! \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0441\u043c\u0435\u0440\u0442\u044c \u0438 \u043e\u043d\u0438 \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u0440\u0430\u043d\u0443\u0434!
zone.loadout.reenter = \u041d\u0435\u043b\u044c\u0437\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0441\u043e \u0441\u043f\u0430\u0443\u043d\u0430.
zone.monument.badblock = \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u043c\u043e\u043d\u0443\u043c\u0435\u043d\u0442 \u0431\u043b\u043e\u043a\u043e\u043c \u0446\u0432\u0435\u0442\u0430 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u0431\u043b\u043e\u043a \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u0435
zone.monument.capture = \u041c\u043e\u043d\u0443\u043c\u0435\u043d\u0442 {0} \u0431\u044b\u043b \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 {1}!
zone.monument.lose = \u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0} \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043c\u043e\u043d\u0443\u043c\u0435\u043d\u0442\u043e\u043c {1}
zone.noteamnotice = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u043d\u0430 \u0430\u0440\u0435\u043d\u0435, \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443!
zone.score.empty = \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0447\u0435\u0442, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435.
zone.spawn.minplayers = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u0442\u044c \u0441\u043f\u0430\u0443\u043d, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u0433\u0440\u043e\u043a\u043e\u0432 {0} \u0432 {1} \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445.\n
zone.spawn.timer = \u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e \u0441\u043f\u0430\u0443\u043d\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 {0} \u0441\u0435\u043a \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f!
zone.steal.bomb.broadcast = {0} \u043d\u0430\u0448\u0435\u043b \u0431\u043e\u043c\u0431\u0443 {1}.
zone.steal.bomb.notice = \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043c\u0431\u0430 {0}. \u041f\u0440\u0438\u043d\u0435\u0441\u0438\u0442\u0435 \u0435\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0447\u043a\u043e!\u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0440\u0430\u043d\u0438\u0442 \u0412\u0430\u0441 - \u0412\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u0437\u043e\u0440\u0432\u0430\u043d\u044b!
zone.steal.cake.notice = \u0412\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u0442\u043e\u0440\u0442 {0}. \u041f\u0440\u0438\u043d\u0435\u0441\u0438\u0442\u0435 \u0435\u0433\u043e \u043a \u0441\u043f\u0430\u0443\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0447\u043a\u043e \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0432\u0441\u0435 \u0436\u0438\u0437\u043d\u0438!
zone.steal.flag.empty = \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u0444\u043b\u0430\u0433 {0}, \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0438\u0433\u0440\u043e\u043a\u043e\u0432 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b!
zone.steal.flag.notice = \u0412\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u0444\u043b\u0430\u0433 {0}. \u041f\u0440\u0438\u043d\u0435\u0441\u0438\u0442\u0435 \u0435\u0433\u043e \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u0435, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0435\u0433\u043e!
zone.steal.flag.prevent = \u041f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u043b {0} \u043e\u0442 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b {1} spawn or flag.
zone.stealextra.bomb = \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0431\u043e\u043c\u0431\u0443!
zone.stealextra.cake = \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0442\u043e\u0440\u0442!
zone.stealextra.flag = \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0444\u043b\u0430\u0433!
zone.stealextra.other = \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0432\u0435\u0448\u044c!
zone.teaminfo.format = {0}: {1} \u043e\u0447\u043a\u043e\u0432, {2}/{3} \u0441\u043c\u0435\u0440\u0442\u0435\u0439. {4}
zone.teaminfo.none = \u0435\u0449\u0435 \u043d\u0435\u0442\u0443
zone.teaminfo.prefix = \u041a\u043e\u043c\u0430\u043d\u0434\u044b:
zone.teleport = \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0430\u0440\u0435\u043d\u0443 {0}.
zone.warp.permission = \u0412\u0430\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u0441\u044f \u043d\u0430 \u0430\u0440\u0435\u043d\u0443.
zone.zone404 = \u0410\u0440\u0435\u043d\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430.
zone.zoneinfo.format = {0}: {1} \u043a\u043e\u043c\u0430\u043d\u0434, {2} \u0438\u0433\u0440\u043e\u043a\u043e\u0432
zone.zoneinfo.prefix = \u0410\u0440\u0435\u043d\u044b:
zone.zoneinfo.teleport = \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 /zone \u0438\u043c\u044f_\u0430\u0440\u0435\u043d\u044b \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0439\u0442\u0438 \u043d\u0430 \u0430\u0440\u0435\u043d\u0443