forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -218,12 +218,10 @@ public class FlatteningWrapper {
|
||||
|
||||
public boolean inWater(org.bukkit.World world, Vector tntPosition) {
|
||||
Block block = world.getBlockAt(tntPosition.getBlockX(), tntPosition.getBlockY(), tntPosition.getBlockZ());
|
||||
if (block.getType() == Material.WATER)
|
||||
return true;
|
||||
if (block.getType() == Material.WATER) return true;
|
||||
|
||||
BlockData data = block.getBlockData();
|
||||
if (!(data instanceof Waterlogged))
|
||||
return false;
|
||||
if (!(data instanceof Waterlogged)) return false;
|
||||
|
||||
return ((Waterlogged) data).isWaterlogged();
|
||||
}
|
||||
|
||||
@@ -48,8 +48,10 @@ public class RayTraceUtils {
|
||||
REntity nearestHitEntity = null;
|
||||
RRayTraceResult nearestHitResult = null;
|
||||
double nearestDistanceSq = Double.MAX_VALUE;
|
||||
for (REntity entity: entityList) {
|
||||
if (!isOccluded(startPos.toVector(), direction, new Vector(entity.getX(), entity.getY() + 0.5, entity.getZ()))) continue;
|
||||
for (REntity entity : entityList) {
|
||||
if (!isOccluded(startPos.toVector(), direction, new Vector(entity.getX(), entity.getY() + 0.5, entity.getZ()))) {
|
||||
continue;
|
||||
}
|
||||
double distanceSq = new Vector(entity.getX(), entity.getY() + 0.5, entity.getZ()).distanceSquared(startPos.toVector());
|
||||
if (distanceSq > 100.0) continue;
|
||||
if (distanceSq < nearestDistanceSq) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public interface ScoreboardElement {
|
||||
ScoreboardGroup getGroup();
|
||||
|
||||
int order();
|
||||
|
||||
String get(Region region, Player p);
|
||||
|
||||
@@ -27,22 +27,29 @@ import org.bukkit.boss.BarStyle;
|
||||
public interface BauSystemBossbar {
|
||||
|
||||
String getTitle();
|
||||
|
||||
void setTitle(String title);
|
||||
|
||||
double getProgress();
|
||||
|
||||
void setProgress(double progress);
|
||||
|
||||
BarColor getColor();
|
||||
|
||||
void setColor(BarColor color);
|
||||
|
||||
BarStyle getStyle();
|
||||
|
||||
void setStyle(BarStyle style);
|
||||
|
||||
boolean hasFlag(BarFlag flag);
|
||||
|
||||
void addFlag(BarFlag flag);
|
||||
|
||||
void removeFlag(BarFlag flag);
|
||||
|
||||
boolean isVisible();
|
||||
|
||||
void setVisible(boolean visible);
|
||||
|
||||
Region getRegion();
|
||||
|
||||
Reference in New Issue
Block a user