mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-24 09:29:19 +00:00
trigger death actions
This commit is contained in:
@@ -317,6 +317,7 @@ public class CropBlock extends AbstractCustomCropsBlock {
|
||||
Optional.ofNullable(deathCondition.deathStage()).ifPresent(it -> {
|
||||
BukkitCustomCropsPlugin.getInstance().getItemManager().place(bukkitLocation, deathCondition.existenceForm(), it, rotation);
|
||||
});
|
||||
ActionManager.trigger(context, config.deathActions());
|
||||
}, deathCondition.deathDelay(), bukkitLocation);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@ public interface RequirementManager<T> extends Reloadable {
|
||||
static <T> boolean isSatisfied(Context<T> context, @Nullable Requirement<T>[] requirements) {
|
||||
if (requirements == null) return true;
|
||||
for (Requirement<T> requirement : requirements) {
|
||||
if (requirement == null) continue;
|
||||
if (!requirement.isSatisfied(context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user