Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void giveFlu(LivingUpdateEvent event)
- {
- System.out.print("You are updated!");
- if(event.entityLiving instanceof EntityPlayer)
- {
- EntityPlayer player1 = (EntityPlayer)event.entityLiving;
- EntityPlayer player2 = player1.worldObj.getClosestPlayerToEntity(player1, 2);
- if(player2 != null)
- {
- System.out.print("You got the method right!");
- if(player1.getActivePotionEffect(EpidemicCraft.potionFlu) != null)
- {
- System.out.print("Potion added! 1.7.10 is done!");
- ((EntityLivingBase)player2).addPotionEffect(new PotionEffect(EpidemicCraft.potionFlu.id, 1000, 0));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement