Fixing snowballs and eggs in Solo Skywars.

This commit is contained in:
Sarah 2015-08-19 16:00:36 +02:00
parent 27da9b64b6
commit 6e926b431c

View File

@ -964,8 +964,13 @@ public abstract class Skywars extends Game
if (event.GetDamage() >= 1)
return;
if(GetTeam(event.GetDamagerPlayer(true)) == GetTeam(event.GetDamageePlayer()))
return;
if(this instanceof TeamSkywars)
{
if(GetTeam(event.GetDamagerPlayer(true)) == GetTeam(event.GetDamageePlayer()))
{
return;
}
}
if (event.GetProjectile() instanceof Egg || event.GetProjectile() instanceof Snowball)
{
@ -998,6 +1003,10 @@ public abstract class Skywars extends Game
{
if(event.getEntity() instanceof Player)
{
if(this instanceof SoloSkywars)
return;
if(GetTeam((Player) prj.getShooter()) == GetTeam((Player) event.getEntity()))
{
event.setCancelled(true);