Fixed all compile errors ( Took forever )

This commit is contained in:
ProSavage
2018-07-28 00:31:58 -05:00
parent 403a086ea7
commit 51f157931f
15 changed files with 62 additions and 68 deletions

View File

@@ -406,7 +406,7 @@ public enum ParticleEffect {
* @param requiredVersion Version which is required (1.x)
* @param properties Properties of this particle effect
*/
private ParticleEffect(String name, int id, int requiredVersion, ParticleProperty... properties) {
ParticleEffect(String name, int id, int requiredVersion, ParticleProperty... properties) {
this.name = name;
this.id = id;
this.requiredVersion = requiredVersion;
@@ -453,7 +453,7 @@ public enum ParticleEffect {
*/
private static boolean isWater(Location location) {
Material material = location.getBlock().getType();
return material == Material.WATER || material == Material.STATIONARY_WATER;
return material == Material.WATER || material == Material.LEGACY_STATIONARY_WATER;
}
/**
@@ -910,7 +910,7 @@ public enum ParticleEffect {
* @author DarkBlade12
* @since 1.7
*/
public static enum ParticleProperty {
public enum ParticleProperty {
/**
* The particle effect requires water to be displayed
*/
@@ -926,7 +926,7 @@ public enum ParticleEffect {
/**
* The particle effect uses the offsets as color values
*/
COLORABLE;
COLORABLE
}
/**

View File

@@ -1,11 +1,11 @@
package com.massivecraft.factions.util;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import java.util.*;
import java.util.Map.Entry;
public class VisualizeUtil {
@@ -25,42 +25,35 @@ public class VisualizeUtil {
}
@SuppressWarnings("deprecation")
public static void addLocation(Player player, Location location, int typeId, byte data) {
public static void addLocation(Player player, Location location, Material type, byte data) {
getPlayerLocations(player).add(location);
player.sendBlockChange(location, typeId, data);
player.sendBlockChange(location, type, data);
}
@SuppressWarnings("deprecation")
public static void addLocation(Player player, Location location, int typeId) {
public static void addLocation(Player player, Location location, Material material) {
getPlayerLocations(player).add(location);
player.sendBlockChange(location, typeId, (byte) 0);
player.sendBlockChange(location, material, (byte) 0);
}
@SuppressWarnings("deprecation")
public static void addLocations(Player player, Map<Location, Integer> locationMaterialIds) {
Set<Location> ploc = getPlayerLocations(player);
for (Entry<Location, Integer> entry : locationMaterialIds.entrySet()) {
ploc.add(entry.getKey());
player.sendBlockChange(entry.getKey(), entry.getValue(), (byte) 0);
}
}
@SuppressWarnings("deprecation")
public static void addLocations(Player player, Collection<Location> locations, int typeId) {
public static void addLocations(Player player, Collection<Location> locations, Material material) {
Set<Location> ploc = getPlayerLocations(player);
for (Location location : locations) {
ploc.add(location);
player.sendBlockChange(location, typeId, (byte) 0);
player.sendBlockChange(location, material, (byte) 0);
}
}
@SuppressWarnings("deprecation")
public static void addBlocks(Player player, Collection<Block> blocks, int typeId) {
public static void addBlocks(Player player, Collection<Block> blocks, Material material) {
Set<Location> ploc = getPlayerLocations(player);
for (Block block : blocks) {
Location location = block.getLocation();
ploc.add(location);
player.sendBlockChange(location, typeId, (byte) 0);
player.sendBlockChange(location, material, (byte) 0);
}
}
@@ -72,7 +65,7 @@ public class VisualizeUtil {
}
for (Location location : locations) {
Block block = location.getWorld().getBlockAt(location);
player.sendBlockChange(location, block.getTypeId(), block.getData());
player.sendBlockChange(location, block.getType(), block.getData());
}
locations.clear();
}