Fixing snowballs and eggs in Solo Skywars.
This commit is contained in:
parent
27da9b64b6
commit
6e926b431c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user