From d3884bd090160bbff04bd47853f94304521bc86f Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Wed, 17 Feb 2016 22:12:23 -0500 Subject: [PATCH] - Spawn regen --- .../games/minecraftleague/MinecraftLeague.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minecraftleague/MinecraftLeague.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minecraftleague/MinecraftLeague.java index a25098ff2..3f6356052 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minecraftleague/MinecraftLeague.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minecraftleague/MinecraftLeague.java @@ -12,7 +12,6 @@ import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilItem; -import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; @@ -26,6 +25,7 @@ import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; import nautilus.game.arcade.events.GameStateChangeEvent; +import nautilus.game.arcade.events.PlayerGameRespawnEvent; import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam.PlayerState; import nautilus.game.arcade.game.TeamGame; @@ -83,6 +83,8 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.LeatherArmorMeta; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import org.bukkit.util.Vector; import com.google.common.base.Objects; @@ -856,7 +858,7 @@ public class MinecraftLeague extends TeamGame } } - /*@EventHandler + @EventHandler public void onRespawn(PlayerGameRespawnEvent event) { if (event.GetGame() != this) @@ -864,7 +866,9 @@ public class MinecraftLeague extends TeamGame Player player = event.GetPlayer(); - if (!_crystals.get(GetTeam(player)).Alive) + player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5 * 20, 3)); + + /*if (!_crystals.get(GetTeam(player)).Alive) { SetPlayerState(player, PlayerState.OUT); @@ -891,8 +895,8 @@ public class MinecraftLeague extends TeamGame } if (_overTime) - _crystals.get(GetTeam(player)).damage(20, null); - }*/ + _crystals.get(GetTeam(player)).damage(20, null);*/ + } @EventHandler public void onDrop(PlayerDropItemEvent event)