No longer send the invalid kit message if kit is null
This commit is contained in:
parent
60a468d03d
commit
a1b272b5a4
|
@ -1103,7 +1103,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed
|
|||
return;
|
||||
}
|
||||
|
||||
setFirstKit(player, team);
|
||||
setFirstKit(player, team, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1125,13 +1125,17 @@ public abstract class Game extends ListenerComponent implements Lifetimed
|
|||
}
|
||||
}
|
||||
|
||||
setFirstKit(player, team);
|
||||
setFirstKit(player, team, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void setFirstKit(Player player, GameTeam team)
|
||||
private void setFirstKit(Player player, GameTeam team, boolean inform)
|
||||
{
|
||||
player.sendMessage(F.main("Kit", "Your current kit is not applicable with your team. Please select a different kit"));
|
||||
if (inform)
|
||||
{
|
||||
player.sendMessage(F.main("Kit", "Your current kit is not applicable with your team. Please select a different kit."));
|
||||
}
|
||||
|
||||
Arrays.stream(_kits).filter(team::KitAllowed).findFirst().ifPresent(kit1 -> SetKit(player, kit1, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class PerkLifeSteal extends Perk
|
|||
if (killer != null && hasPerk(killer))
|
||||
{
|
||||
CakeWars game = (CakeWars) Manager.GetGame();
|
||||
double increase = Math.max(0, _increase - game.getDeathsInLastMinute(player));
|
||||
double increase = Math.max(0, _increase - game.getDeathsInLastMinute(player) * 2);
|
||||
|
||||
UtilPlayer.health(killer, increase);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue