Java Code Examples for org.bukkit.Material#STATIONARY_LAVA
The following examples show how to use
org.bukkit.Material#STATIONARY_LAVA .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CoreMatchModule.java From PGM with GNU Affero General Public License v3.0 | 6 votes |
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void leakCheck(final BlockTransformEvent event) { if (event.getWorld() != this.match.getWorld()) return; if (event.getNewState().getType() == Material.STATIONARY_LAVA) { Vector blockVector = BlockVectors.center(event.getNewState()).toVector(); for (Core core : this.cores) { if (!core.hasLeaked() && core.getLeakRegion().contains(blockVector)) { // core has leaked core.markLeaked(); this.match.callEvent(new CoreLeakEvent(this.match, core, event.getNewState())); this.match.callEvent( new GoalCompleteEvent( this.match, core, core.getOwner(), false, core.getContributions())); } } } }
Example 2
Source File: CoreMatchModule.java From ProjectAres with GNU Affero General Public License v3.0 | 6 votes |
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void leakCheck(final BlockTransformEvent event) { if(event.getWorld() != this.match.getWorld()) return; if(event.getNewState().getType() == Material.STATIONARY_LAVA) { Vector blockVector = BlockUtils.center(event.getNewState()).toVector(); for(Core core : this.cores) { if(!core.hasLeaked() && core.getLeakRegion().contains(blockVector)) { // core has leaked core.markLeaked(); this.match.getPluginManager().callEvent(new CoreLeakEvent(this.match, core, event.getNewState())); this.match.getPluginManager().callEvent(new GoalCompleteEvent(core, true, c -> false, c -> !c.equals(core.getOwner()), core.getContributions())); } } } }
Example 3
Source File: Strafe.java From Hawk with GNU General Public License v3.0 | 5 votes |
private boolean testLiquid(Set<Material> mats) { for(Material mat : mats) { if(mat == Material.WATER || mat == Material.STATIONARY_WATER || mat == Material.LAVA || mat == Material.STATIONARY_LAVA) return true; } return false; }
Example 4
Source File: LavaCheck.java From askyblock with GNU General Public License v2.0 | 5 votes |
public boolean generatesCobble(Block block, Block toBlock){ Material mirrorID1 = (block.getType().equals(Material.WATER)) || (block.getType().equals(Material.STATIONARY_WATER)) ? Material.LAVA : Material.WATER; Material mirrorID2 = (block.getType().equals(Material.WATER)) || (block.getType().equals(Material.STATIONARY_WATER)) ? Material.STATIONARY_LAVA : Material.STATIONARY_WATER; for (BlockFace face: FACES) { Block r = toBlock.getRelative(face); if ((r.getType().equals(mirrorID1)) || (r.getType().equals(mirrorID2))) { return true; } } return false; }
Example 5
Source File: Materials.java From PGM with GNU Affero General Public License v3.0 | 4 votes |
static boolean isLava(Material material) { return material == Material.LAVA || material == Material.STATIONARY_LAVA; }
Example 6
Source File: CraftBlock.java From Kettle with GNU General Public License v3.0 | 4 votes |
public boolean isLiquid() { return (getType() == Material.WATER) || (getType() == Material.STATIONARY_WATER) || (getType() == Material.LAVA) || (getType() == Material.STATIONARY_LAVA); }
Example 7
Source File: Materials.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
public static boolean isLava(Material material) { return material == Material.LAVA || material == Material.STATIONARY_LAVA; }
Example 8
Source File: CraftBlock.java From Thermos with GNU General Public License v3.0 | 4 votes |
public boolean isLiquid() { return (getType() == Material.WATER) || (getType() == Material.STATIONARY_WATER) || (getType() == Material.LAVA) || (getType() == Material.STATIONARY_LAVA); }