Fixed an NPE with Inferno
This commit is contained in:
Sam 2016-07-03 15:58:19 +01:00
parent 26361eaee0
commit bdc049efe1

View File

@ -2,7 +2,6 @@ package nautilus.game.arcade.kit.perks;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Item;
@ -127,7 +126,13 @@ public class PerkInferno extends SmashPerk
if (Manager.GetGame() instanceof TeamSuperSmash)
{
TeamSuperSmash smash = (TeamSuperSmash) Manager.GetGame();
if (smash.GetTeam(event.GetDamagerPlayer(false)).equals(smash.GetTeam(event.GetDamageePlayer())))
if (event.GetDamagerPlayer(true) == null)
{
return;
}
if (smash.GetTeam(event.GetDamagerPlayer(true)).equals(smash.GetTeam(event.GetDamageePlayer())))
{
event.GetDamageeEntity().setFireTicks(0);
event.SetCancelled("Team Damage");