Class EntityProjectile

java.lang.Object
net.minestom.server.entity.Entity
net.minestom.server.entity.EntityProjectile
All Implemented Interfaces:
Sound.Emitter, HoverEventSource<HoverEvent.ShowEntity>, Shape, EventHandler<EntityEvent>, PermissionHandler, Snapshotable, Taggable, TagReadable, TagWritable, Tickable, Schedulable, Viewable

public class EntityProjectile extends Entity
Class that allows to instantiate entities with projectile-like physics handling.
  • Constructor Details

    • EntityProjectile

      public EntityProjectile(@Nullable @Nullable Entity shooter, @NotNull @NotNull EntityType entityType)
  • Method Details

    • getShooter

      @Nullable public @Nullable Entity getShooter()
    • shoot

      public void shoot(Point to, double power, double spread)
    • tick

      public void tick(long time)
      Description copied from class: Entity
      Updates the entity, called every tick.

      Ignored if Entity.getInstance() returns null.

      Specified by:
      tick in interface Tickable
      Overrides:
      tick in class Entity
      Parameters:
      time - the update time in milliseconds