Use attack name for Snowballs and Eggs
This commit is contained in:
parent
93e49bc8a6
commit
3bab7ffe44
@ -984,19 +984,10 @@ public abstract class Skywars extends Game
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (this instanceof TeamSkywars && event.GetDamagerPlayer(true) instanceof Player && event.GetDamageeEntity() instanceof Player)
|
||||
{
|
||||
if (GetTeam(event.GetDamagerPlayer(true)).equals(GetTeam(event.GetDamageePlayer())))
|
||||
{
|
||||
event.SetCancelled("Team Damage");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.GetProjectile() instanceof Egg || event.GetProjectile() instanceof Snowball)
|
||||
{
|
||||
event.AddMod(event.GetDamagerPlayer(true).getName(), (event.GetProjectile() instanceof Egg ? "Egg" : "Snowball"), 2, false);
|
||||
event.AddMod(event.GetDamagerPlayer(true).getName(), (event.GetProjectile() instanceof Egg ? "Egg" : "Snowball"), 2, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user