Minestom/src/main/java/net/minestom/server/event/entity/EntityVelocityEvent.java
Felix Cravic 5e91b75d78 Comments
2020-05-28 19:15:55 +02:00

38 lines
855 B
Java

package net.minestom.server.event.entity;
import net.minestom.server.entity.Entity;
import net.minestom.server.event.CancellableEvent;
import net.minestom.server.utils.Vector;
public class EntityVelocityEvent extends CancellableEvent {
private Entity entity;
private Vector velocity;
public EntityVelocityEvent(Entity entity, Vector velocity) {
this.entity = entity;
this.velocity = velocity;
}
/**
* @return the entity who the velocity is applied to
*/
public Entity getEntity() {
return entity;
}
/**
* @return the velocity which will be applied
*/
public Vector getVelocity() {
return velocity;
}
/**
* @param velocity the new velocity to applies
*/
public void setVelocity(Vector velocity) {
this.velocity = velocity;
}
}