9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-28 19:39:20 +00:00
This commit is contained in:
XiaoMoMi
2024-04-15 13:52:19 +08:00
parent 769e1141b2
commit 02414a290c
3 changed files with 5 additions and 8 deletions

View File

@@ -26,10 +26,7 @@ import net.momirealms.customcrops.util.RotationUtils;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
import org.bukkit.inventory.ItemStack;
import java.util.Collection;
@@ -68,7 +65,7 @@ public interface CustomProvider {
return false;
Location center = LocationUtils.toCenterLocation(location);
Collection<Entity> entities = center.getWorld().getNearbyEntities(center, 0.5,0.51,0.5);
entities.removeIf(entity -> entity instanceof Player);
entities.removeIf(entity -> (entity instanceof Player || entity instanceof Item));
return entities.size() == 0;
}