Skip to content

Commit f1cfae8

Browse files
committed
fix entity#remove out of scheduled task
1 parent 3652261 commit f1cfae8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ private void enforceEntityLimit(Map<EntityType, List<Entity>> entitiesByTypes) {
187187
for (int i = entityLimit; i < entityCount; i++) {
188188
int rem = removed++;
189189
Entity entity = entry.getValue().get(i);
190-
entity.remove();
191190
entity.getScheduler().execute(plugin, () -> {
191+
entity.remove();
192192
logger().info("Removed {} at {} ({}/{} limit={})",
193193
entity.getType(),
194194
LocationUtil.toString(entity.getLocation()),

0 commit comments

Comments
 (0)