Tracer-entity #147
@ -21,6 +21,7 @@ package de.steamwar.bausystem.tracer;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -31,7 +32,7 @@ public class TNTTracer_12 {
|
||||
}
|
||||
|
||||
public static boolean inWater(World world, Vector tntPosition) {
|
||||
Material material = tntPosition.toLocation(world).getBlock().getType();
|
||||
Material material = world.getBlockAt(tntPosition.getBlockX(), tntPosition.getBlockY(), tntPosition.getBlockZ()).getType();
|
||||
return material == Material.WATER || material == Material.STATIONARY_WATER;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class TNTTracer_15 {
|
||||
}
|
||||
|
||||
|
||||
public static boolean inWater(World world, Vector tntPosition) {
|
||||
Block block = tntPosition.toLocation(world).getBlock();
|
||||
Block block = world.getBlockAt(tntPosition.getBlockX(), tntPosition.getBlockY(), tntPosition.getBlockZ());
|
||||
if(block.getType() == Material.WATER)
|
||||
return true;
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Hier scheint eine Überprüfung auf Waterlogged-Blöcke zu fehlen (vgl. FightSystem isWater)
Ist nun eingebaut