All Downloads are FREE. Search and download functionalities are using the official Maven repository.

emu.grasscutter.server.event.entity.EntityDeathEvent Maven / Gradle / Ivy

There is a newer version: 1.7.3
Show newest version
package emu.grasscutter.server.event.entity;

import emu.grasscutter.game.entity.GameEntity;
import emu.grasscutter.game.world.Location;
import emu.grasscutter.server.event.types.EntityEvent;
import javax.annotation.Nullable;
import lombok.Getter;

public final class EntityDeathEvent extends EntityEvent {
    @Getter private final Location deathLocation;
    @Getter @Nullable private final GameEntity killer;

    public EntityDeathEvent(GameEntity entity, int killerId) {
        super(entity);

        this.deathLocation = new Location(entity.getScene(), entity.getPosition());
        this.killer = entity.getScene().getEntityById(killerId);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy