java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.armor.StomperBoots
All Implemented Interfaces:
Placeable

public class StomperBoots extends SlimefunItem
The Boots of the Stomper are boots which damage nearby enemies whenever the Player takes fall damage.
Author:
TheBusyBiscuit
  • Constructor Details

  • Method Details

    • stomp

      public void stomp(@Nonnull org.bukkit.event.entity.EntityDamageEvent fallDamageEvent)
      This will apply the "stomp" effect to the given EntityDamageEvent.
      Parameters:
      fallDamageEvent - The EntityDamageEvent in which the Player has taken fall damage
    • getShockwave

      @Nonnull protected org.bukkit.util.Vector getShockwave(@Nonnull org.bukkit.Location origin, @Nonnull org.bukkit.Location target)
      This gives us the "shockwave" Vector for a given target.
      Parameters:
      origin - The Location of our Player
      target - The Location of the Entity we are pushing away
      Returns:
      A Vector to determine the velocity for our Entity
    • canPush

      protected boolean canPush(@Nonnull org.bukkit.entity.Player player, @Nonnull org.bukkit.entity.LivingEntity entity)
      Checks if the stomper boots can move an entity and is not the player who is using the boots.

      For developers: If you're spawning an immovable NPC, you should be denying collision with LivingEntity.setCollidable(boolean) or gravity with Entity.setGravity(boolean).

      Parameters:
      player - The Player using the StomperBoots.
      entity - The LivingEntity to check.
      Returns:
      If the entity can move.