- Added slowness to flag carriers and removed any active potion effects they had
This commit is contained in:
parent
0035f3abb0
commit
6c5c2f4c4e
@ -50,6 +50,7 @@ import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class CaptureTheFlag extends TeamGame
|
||||
{
|
||||
@ -277,6 +278,7 @@ public class CaptureTheFlag extends TeamGame
|
||||
}
|
||||
player.getInventory().setHelmet(_helmets.get(player));
|
||||
player.updateInventory();
|
||||
player.removePotionEffect(PotionEffectType.SLOW);
|
||||
_hotbars.remove(player);
|
||||
_helmets.remove(player);
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class Flag
|
||||
{
|
||||
@ -285,6 +287,11 @@ public class Flag
|
||||
player.getInventory().setHelmet(_representation);
|
||||
player.updateInventory();
|
||||
|
||||
for (PotionEffect effect : player.getActivePotionEffects())
|
||||
player.removePotionEffect(effect.getType());
|
||||
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1000000, 0));
|
||||
|
||||
AnnounceCapture(player);
|
||||
_holding = player;
|
||||
_dropped = false;
|
||||
|
Loading…
Reference in New Issue
Block a user