Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void giveFlu(LivingUpdateEvent event)
- {
- if(event.entityLiving instanceof EntityPlayer)
- {
- EntityPlayer player1 = (EntityPlayer)event.entityLiving;
- if(player1.getActivePotionEffect(EpidemicCraft.potionFlu) != null)
- {
- List<EntityPlayer> list = player1.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(player1.posX - 2, player1.posY - 2, player1.posZ - 2, player1.posX + 2, player1.posY + 2, player1.posZ + 2));
- if(list != null)
- {
- Iterator<EntityPlayer> iterator = list.iterator();
- for (EntityPlayer temp : list) {
- temp.addPotionEffect(new PotionEffect(EpidemicCraft.potionFlu.id, 1000, 0));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement