/**
  * Checks if the player is on ice.
  *
  * @return true, if the player is on ice
  */
 public boolean isOnIce() {
   if (onIce == null) {
     final org.bukkit.entity.Player entity = this.entityPlayer.getBukkitEntity();
     if (entity.isSneaking() || entity.isBlocking())
       onIce = getTypeId(blockX, Location.locToBlock(minY - 0.1D), blockZ) == Material.ICE.getId();
     else onIce = getTypeIdBelow().intValue() == Material.ICE.getId();
   }
   return onIce;
 }
Example #2
0
 /*
  * (non-Javadoc)
  *
  * @see
  * be.Balor.Tools.Egg.EggType#processArguments(org.bukkit.entity.Player,
  * be.Balor.Manager.Commands.CommandArgs)
  */
 @Override
 protected void processArguments(final Player sender, final CommandArgs args)
     throws ProcessingArgsException {
   final int radius = getRadius(sender, args);
   if (radius == -1) return;
   value = new BlockChangeInfo(Material.ICE.getId(), radius);
 }