PC-827
Team SSM - Teammates can no longer cancel each other's Blaze Firefly
This commit is contained in:
parent
df646b0659
commit
82b2541e34
@ -17,15 +17,17 @@ import mineplex.core.common.util.F;
|
|||||||
import mineplex.core.common.util.UtilAction;
|
import mineplex.core.common.util.UtilAction;
|
||||||
import mineplex.core.common.util.UtilBlock;
|
import mineplex.core.common.util.UtilBlock;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
|
||||||
import mineplex.core.common.util.UtilServer;
|
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
import nautilus.game.arcade.game.Game;
|
||||||
|
import nautilus.game.arcade.game.games.smash.TeamSuperSmash;
|
||||||
import nautilus.game.arcade.kit.SmashPerk;
|
import nautilus.game.arcade.kit.SmashPerk;
|
||||||
import nautilus.game.arcade.kit.perks.data.FireflyData;
|
import nautilus.game.arcade.kit.perks.data.FireflyData;
|
||||||
|
|
||||||
@ -170,6 +172,11 @@ public class PerkFirefly extends SmashPerk
|
|||||||
if (event.GetDamage() <= 4)
|
if (event.GetDamage() <= 4)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!(event.GetDamagerEntity(true) instanceof Player))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Iterator<FireflyData> dataIterator = _data.iterator();
|
Iterator<FireflyData> dataIterator = _data.iterator();
|
||||||
|
|
||||||
while (dataIterator.hasNext())
|
while (dataIterator.hasNext())
|
||||||
@ -181,6 +188,17 @@ public class PerkFirefly extends SmashPerk
|
|||||||
|
|
||||||
if (!UtilTime.elapsed(data.Time, 1250) && !isSuperActive(data.Player))// && event.GetCause() == DamageCause.PROJECTILE)
|
if (!UtilTime.elapsed(data.Time, 1250) && !isSuperActive(data.Player))// && event.GetCause() == DamageCause.PROJECTILE)
|
||||||
{
|
{
|
||||||
|
Game game = Manager.GetGame();
|
||||||
|
|
||||||
|
if (game instanceof TeamSuperSmash)
|
||||||
|
{
|
||||||
|
if (game.GetTeam(data.Player).equals(game.GetTeam(event.GetDamagerPlayer(true))))
|
||||||
|
{
|
||||||
|
event.SetCancelled("Team Damage");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dataIterator.remove();
|
dataIterator.remove();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user