Examples of addPotionEffect()


Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()

      ItemStack amulet = PlayerHandler.getPlayerBaubles(player).getStackInSlot(0);

      if(amulet != null && amulet.getItem() == this) {
        event.setCanceled(true);
        player.setHealth(player.getMaxHealth());
        player.addPotionEffect(new PotionEffect(Potion.resistance.id, 300, 6));
        player.addChatMessage(new ChatComponentTranslation("botaniamisc.savedByLaurel"));
        player.worldObj.playSoundAtEntity(player, "botania:goldenLaurel", 1F, 0.3F);
        PlayerHandler.getPlayerBaubles(player).setInventorySlotContents(0, null);
      }
    }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()

        EntityPlayer player = e.player;
        if (!PermissionsManager.checkPermission(player, BYPASSPOTION))
        {
            for (PotionEffect effect : potionEffects)
            {
                player.addPotionEffect(effect);
            }
        }
        if (!PermissionsManager.checkPermission(player, BYPASSSTATS))
        {
            player.getFoodStats().addStats(-1 * (20 - food), 0);
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()

      else if (count > 1)
        duration = 400;
      else if (count > 0)
        duration = 600;

      player.addPotionEffect(new PotionEffect(Potion.poison.id, duration, 0));
    }

    return storedData;
  }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()

    @SuppressWarnings("rawtypes")
    List list = housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, beatifyBox);

    for (Object obj : list) {
      EntityPlayer player = (EntityPlayer) obj;
      player.addPotionEffect(new PotionEffect(potionId, duration, 0));
    }

    return storedData;
  }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()

            if (stack != null && player.isUsingItem())
            {
                Item item = stack.getItem();
                if (item == TinkerTools.cutlass)
                {
                    player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 3 * 20, 1));
                }
                else if (item == TinkerTools.battlesign)
                {
                    event.ammount *= 1.5; //Puts battlesign blocking at 3/4 instead of 1/2
                }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()

        {
            EntityPlayer player = (EntityPlayer) entity;
            ItemStack equipped = player.getCurrentEquippedItem();
            if (equipped == stack)
            {
                player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 2, 2, true));
            }
        }
    }

    /*
 
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.addPotionEffect()

        {
            EntityPlayerMP player = UserIdent.getPlayerByMatchOrUsername(sender, args[0]);

            if (player != null)
            {
                player.addPotionEffect(eff);
            }
            else
            {
                OutputHandler.chatError(sender, String.format("Player %s does not exist, or is not online.", args[0]));
            }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.addPotionEffect()

        EntityPlayerMP player = UserIdent.getPlayerByMatchOrUsername(sender, args[0]);

        if (player != null)
        {
            player.addPotionEffect(eff);
        }
        else
        {
            OutputHandler.chatError(sender, String.format("Player %s does not exist, or is not online.", args[0]));
        }
View Full Code Here

Examples of org.bukkit.entity.LivingEntity.addPotionEffect()

        boolean value = false;

        for (Entity entity : area.getEntitiesInArea(types)) {
            if (entity.isValid() && entity instanceof LivingEntity) {
                LivingEntity liv = (LivingEntity) entity;
                liv.addPotionEffect(effect, true);
                value = true;
            }
        }
        return value;
    }
View Full Code Here

Examples of org.bukkit.entity.Player.addPotionEffect()

      if (Handler_nanosuit.suitedPlayers.containsKey(pName)) {
        if (Handler_nanosuit.jumps.contains(pName)) {
          player.removePotionEffect(PotionEffectType.JUMP);
          Handler_nanosuit.jumps.remove(pName);
        } else {
          player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, (int) (20 * CommandsEX.getConf().getDouble("nanoSuitTime")), CommandsEX.getConf().getInt("nanoSuitJump")));
          Handler_nanosuit.jumps.add(pName);
        }
        LogHelper.showInfo("nanoSuitJumpMode", sender);
      } else {
        LogHelper.showInfo("nanoSuitNotActivated", sender, ChatColor.RED);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.