mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-29 11:59:15 +00:00
1.4.4
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
package net.momirealms.customcrops.utils;
|
||||
|
||||
import dev.lone.itemsadder.api.CustomFurniture;
|
||||
import net.momirealms.customcrops.CustomCrops;
|
||||
import net.momirealms.customcrops.datamanager.ConfigManager;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
public class IAFurniture {
|
||||
|
||||
static FileConfiguration config = CustomCrops.instance.getConfig();
|
||||
|
||||
//放置IA自定义家具
|
||||
public static void placeFurniture(String name, Location location){
|
||||
CustomFurniture.spawn(name,location.getWorld().getBlockAt(location));
|
||||
@@ -22,7 +19,7 @@ public class IAFurniture {
|
||||
for(Entity entity : world.getNearbyEntities(location,0,0,0)){
|
||||
if(entity instanceof ArmorStand){
|
||||
if(CustomFurniture.byAlreadySpawned((ArmorStand) entity) != null){
|
||||
if(CustomFurniture.byAlreadySpawned((ArmorStand) entity).getNamespacedID().equalsIgnoreCase(config.getString("config.sprinkler-1")) || CustomFurniture.byAlreadySpawned((ArmorStand) entity).getNamespacedID().equalsIgnoreCase(config.getString("config.sprinkler-2"))){
|
||||
if(CustomFurniture.byAlreadySpawned((ArmorStand) entity).getNamespacedID().equalsIgnoreCase(ConfigManager.Config.sprinkler_1) || CustomFurniture.byAlreadySpawned((ArmorStand) entity).getNamespacedID().equalsIgnoreCase(ConfigManager.Config.sprinkler_2)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user