Allow water to be placed in a half block.

This commit is contained in:
Brianna 2020-10-15 16:49:18 -05:00
parent 600304b212
commit e1cda6d6fb

View File

@ -26,6 +26,7 @@ import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.data.Levelled;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -89,6 +90,13 @@ public class InteractListeners implements Listener {
return;
}
CompatibleMaterial type = CompatibleMaterial.getMaterial(block);
if (type.name().contains("SLAB")) {
event.setCancelled(true);
return;
}
FileManager.Config config = plugin.getFileManager().getConfig(new File(plugin.getDataFolder(), "config.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
IslandWorld world = worldManager.getIslandWorld(block.getWorld());