mirror of
https://github.com/taoneill/war.git
synced 2024-12-02 23:23:30 +01:00
Fix message formatting and CS problems. Closes #700
This commit is contained in:
parent
c6d2c6cbcc
commit
c7e33dd1ca
@ -939,7 +939,7 @@ public class Warzone {
|
||||
War.war.msg(player, "join.inventorystored");
|
||||
}
|
||||
this.respawnPlayer(team, player);
|
||||
this.broadcast("join.broadcast", player.getName(), player.getName());
|
||||
this.broadcast("join.broadcast", player.getName(), team.getKind().getFormattedName());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -185,4 +185,8 @@ public enum TeamKind {
|
||||
public boolean isTeamBlock(MaterialData data) {
|
||||
return data instanceof Wool && ((Wool)data).getColor() == this.dyeColor;
|
||||
}
|
||||
|
||||
public String getFormattedName() {
|
||||
return this.getColor() + this.name().toLowerCase() + ChatColor.WHITE;
|
||||
}
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ public class WarEntityListener implements Listener {
|
||||
*
|
||||
* @see EntityListener.onEntityDamage()
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onEntityDamage(final EntityDamageEvent event) {
|
||||
if (!War.war.isLoaded()) {
|
||||
return;
|
||||
@ -524,7 +524,7 @@ public class WarEntityListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onEntityDeath(final EntityDeathEvent event) {
|
||||
if (!War.war.isLoaded() || !(event.getEntity() instanceof Player)) {
|
||||
return;
|
||||
@ -537,9 +537,9 @@ public class WarEntityListener implements Listener {
|
||||
if (!zone.getWarzoneConfig().getBoolean(WarzoneConfig.REALDEATHS)) {
|
||||
// catch the odd death that gets away from us when usually intercepting and preventing deaths
|
||||
zone.handleDeath(player);
|
||||
|
||||
Team team = Team.getTeamByPlayerName(player.getName());
|
||||
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.DEATHMESSAGES)) {
|
||||
zone.broadcast("pvp.death.other", player.getName());
|
||||
zone.broadcast("pvp.death.other", team.getKind().getColor() + player.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user