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

@ -69,7 +69,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version> <version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>

View File

@ -341,53 +341,53 @@ public class Conf {
territoryEnemyDenyCommands.add("tpaccept"); territoryEnemyDenyCommands.add("tpaccept");
territoryEnemyDenyCommands.add("tpa"); territoryEnemyDenyCommands.add("tpa");
territoryProtectedMaterials.add(Material.WOODEN_DOOR); territoryProtectedMaterials.add(Material.LEGACY_WOODEN_DOOR);
territoryProtectedMaterials.add(Material.TRAP_DOOR); territoryProtectedMaterials.add(Material.LEGACY_TRAP_DOOR);
territoryProtectedMaterials.add(Material.FENCE_GATE); territoryProtectedMaterials.add(Material.LEGACY_FENCE_GATE);
territoryProtectedMaterials.add(Material.DISPENSER); territoryProtectedMaterials.add(Material.DISPENSER);
territoryProtectedMaterials.add(Material.CHEST); territoryProtectedMaterials.add(Material.CHEST);
territoryProtectedMaterials.add(Material.FURNACE); territoryProtectedMaterials.add(Material.FURNACE);
territoryProtectedMaterials.add(Material.BURNING_FURNACE); territoryProtectedMaterials.add(Material.LEGACY_BURNING_FURNACE);
territoryProtectedMaterials.add(Material.DIODE_BLOCK_OFF); territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_OFF);
territoryProtectedMaterials.add(Material.DIODE_BLOCK_ON); territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_ON);
territoryProtectedMaterials.add(Material.JUKEBOX); territoryProtectedMaterials.add(Material.JUKEBOX);
territoryProtectedMaterials.add(Material.BREWING_STAND); territoryProtectedMaterials.add(Material.BREWING_STAND);
territoryProtectedMaterials.add(Material.ENCHANTMENT_TABLE); territoryProtectedMaterials.add(Material.LEGACY_ENCHANTMENT_TABLE);
territoryProtectedMaterials.add(Material.CAULDRON); territoryProtectedMaterials.add(Material.CAULDRON);
territoryProtectedMaterials.add(Material.SOIL); territoryProtectedMaterials.add(Material.LEGACY_SOIL);
territoryProtectedMaterials.add(Material.BEACON); territoryProtectedMaterials.add(Material.BEACON);
territoryProtectedMaterials.add(Material.ANVIL); territoryProtectedMaterials.add(Material.ANVIL);
territoryProtectedMaterials.add(Material.TRAPPED_CHEST); territoryProtectedMaterials.add(Material.TRAPPED_CHEST);
territoryProtectedMaterials.add(Material.DROPPER); territoryProtectedMaterials.add(Material.DROPPER);
territoryProtectedMaterials.add(Material.HOPPER); territoryProtectedMaterials.add(Material.HOPPER);
territoryDenyUseageMaterials.add(Material.FIREBALL); territoryDenyUseageMaterials.add(Material.LEGACY_FIREBALL);
territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL); territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterials.add(Material.BUCKET); territoryDenyUseageMaterials.add(Material.BUCKET);
territoryDenyUseageMaterials.add(Material.WATER_BUCKET); territoryDenyUseageMaterials.add(Material.WATER_BUCKET);
territoryDenyUseageMaterials.add(Material.LAVA_BUCKET); territoryDenyUseageMaterials.add(Material.LAVA_BUCKET);
territoryProtectedMaterialsWhenOffline.add(Material.WOODEN_DOOR); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_WOODEN_DOOR);
territoryProtectedMaterialsWhenOffline.add(Material.TRAP_DOOR); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_TRAP_DOOR);
territoryProtectedMaterialsWhenOffline.add(Material.FENCE_GATE); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_FENCE_GATE);
territoryProtectedMaterialsWhenOffline.add(Material.DISPENSER); territoryProtectedMaterialsWhenOffline.add(Material.DISPENSER);
territoryProtectedMaterialsWhenOffline.add(Material.CHEST); territoryProtectedMaterialsWhenOffline.add(Material.CHEST);
territoryProtectedMaterialsWhenOffline.add(Material.FURNACE); territoryProtectedMaterialsWhenOffline.add(Material.FURNACE);
territoryProtectedMaterialsWhenOffline.add(Material.BURNING_FURNACE); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_BURNING_FURNACE);
territoryProtectedMaterialsWhenOffline.add(Material.DIODE_BLOCK_OFF); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_OFF);
territoryProtectedMaterialsWhenOffline.add(Material.DIODE_BLOCK_ON); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_ON);
territoryProtectedMaterialsWhenOffline.add(Material.JUKEBOX); territoryProtectedMaterialsWhenOffline.add(Material.JUKEBOX);
territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND); territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND);
territoryProtectedMaterialsWhenOffline.add(Material.ENCHANTMENT_TABLE); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_ENCHANTMENT_TABLE);
territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON); territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON);
territoryProtectedMaterialsWhenOffline.add(Material.SOIL); territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_SOIL);
territoryProtectedMaterialsWhenOffline.add(Material.BEACON); territoryProtectedMaterialsWhenOffline.add(Material.BEACON);
territoryProtectedMaterialsWhenOffline.add(Material.ANVIL); territoryProtectedMaterialsWhenOffline.add(Material.ANVIL);
territoryProtectedMaterialsWhenOffline.add(Material.TRAPPED_CHEST); territoryProtectedMaterialsWhenOffline.add(Material.TRAPPED_CHEST);
territoryProtectedMaterialsWhenOffline.add(Material.DROPPER); territoryProtectedMaterialsWhenOffline.add(Material.DROPPER);
territoryProtectedMaterialsWhenOffline.add(Material.HOPPER); territoryProtectedMaterialsWhenOffline.add(Material.HOPPER);
territoryDenyUseageMaterialsWhenOffline.add(Material.FIREBALL); territoryDenyUseageMaterialsWhenOffline.add(Material.LEGACY_FIREBALL);
territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL); territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET); territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET);
territoryDenyUseageMaterialsWhenOffline.add(Material.WATER_BUCKET); territoryDenyUseageMaterialsWhenOffline.add(Material.WATER_BUCKET);

View File

@ -52,7 +52,7 @@ public class CmdBanner extends FCommand {
} else { } else {
warBanner = P.p.createItem(Material.BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore")); warBanner = P.p.createItem(Material.LEGACY_BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore"));
} }
fme.msg(TL.COMMAND_BANNER_SUCCESS); fme.msg(TL.COMMAND_BANNER_SUCCESS);
warBanner.setAmount(1); warBanner.setAmount(1);

View File

@ -128,8 +128,8 @@ public class CmdSeeChunk extends FCommand {
if (useParticles) { if (useParticles) {
this.effect.display(0, 0, 0, 0, 1, loc, player); this.effect.display(0, 0, 0, 0, 1, loc, player);
} else { } else {
int typeId = blockY % 5 == 0 ? Material.REDSTONE_LAMP_ON.getId() : Material.STAINED_GLASS.getId(); Material type = blockY % 5 == 0 ? Material.LEGACY_REDSTONE_LAMP_ON : Material.LEGACY_STAINED_GLASS;
VisualizeUtil.addLocation(player, loc, typeId); VisualizeUtil.addLocation(player, loc, type);
} }
} }
} }

View File

@ -20,7 +20,7 @@ public class CmdSetBanner extends FCommand {
} }
public void perform() { public void perform() {
if (me.getItemInHand().getType() != Material.BANNER) { if (me.getItemInHand().getType() != Material.LEGACY_BANNER) {
fme.msg(TL.COMMAND_SETBANNER_NOTBANNER); fme.msg(TL.COMMAND_SETBANNER_NOTBANNER);
return; return;
} }

View File

@ -78,7 +78,7 @@ public class FactionsBlockListener implements Listener {
if (!fme.hasFaction()) { if (!fme.hasFaction()) {
return; return;
} }
if (event.getBlock().getType() == Material.MOB_SPAWNER) { if (event.getBlock().getType() == Material.LEGACY_MOB_SPAWNER) {
Access access = fme.getFaction().getAccess(fme, PermissableAction.SPAWNER); Access access = fme.getFaction().getAccess(fme, PermissableAction.SPAWNER);
if (access.equals(Access.DENY)) { if (access.equals(Access.DENY)) {
fme.msg(TL.GENERIC_NOPERMISSION, "mine spawners"); fme.msg(TL.GENERIC_NOPERMISSION, "mine spawners");

View File

@ -246,7 +246,7 @@ public class FactionsEntityListener implements Listener {
targets.add(center.getRelative(1, 0, 0)); targets.add(center.getRelative(1, 0, 0));
targets.add(center.getRelative(-1, 0, 0)); targets.add(center.getRelative(-1, 0, 0));
for (Block target : targets) { for (Block target : targets) {
int id = target.getTypeId(); int id = target.getType().getId();
// ignore air, bedrock, water, lava, obsidian, enchanting table, etc.... too bad we can't get a blast resistance value through Bukkit yet // ignore air, bedrock, water, lava, obsidian, enchanting table, etc.... too bad we can't get a blast resistance value through Bukkit yet
if (id != 0 && (id < 7 || id > 11) && id != 49 && id != 90 && id != 116 && id != 119 && id != 120 && id != 130) { if (id != 0 && (id < 7 || id > 11) && id != 49 && id != 90 && id != 116 && id != 119 && id != 120 && id != 130) {
target.breakNaturally(); target.breakNaturally();

View File

@ -25,10 +25,10 @@ public class FactionsExploitListener implements Listener {
// thanks to ObGenBlocker and WorldGuard for this method // thanks to ObGenBlocker and WorldGuard for this method
Block block = event.getToBlock(); Block block = event.getToBlock();
int source = event.getBlock().getTypeId(); int source = event.getBlock().getType().getId();
int target = block.getTypeId(); int target = block.getType().getId();
if ((target == 55 || target == 132) && (source == 0 || source == 10 || source == 11)) { if ((target == 55 || target == 132) && (source == 0 || source == 10 || source == 11)) {
block.setTypeId(0); block.setType(Material.AIR);
} }
} }
@ -47,7 +47,9 @@ public class FactionsExploitListener implements Listener {
// blocks who occupy less than 1 block width or length wise need to be handled differently // blocks who occupy less than 1 block width or length wise need to be handled differently
Material mat = event.getTo().getBlock().getType(); Material mat = event.getTo().getBlock().getType();
if (((mat == Material.THIN_GLASS || mat == Material.IRON_FENCE) && clippingThrough(target, from, 0.65)) || ((mat == Material.FENCE || mat == Material.NETHER_FENCE) && clippingThrough(target, from, 0.45))) { if (((mat == Material.LEGACY_THIN_GLASS
|| mat == Material.LEGACY_IRON_FENCE) && clippingThrough(target, from, 0.65))
|| ((mat == Material.LEGACY_FENCE || mat == Material.LEGACY_NETHER_FENCE) && clippingThrough(target, from, 0.45))) {
event.setTo(from); event.setTo(from);
return; return;
} }

View File

@ -51,6 +51,7 @@ import org.bukkit.util.NumberConversions;
import java.util.*; import java.util.*;
import java.util.logging.Level; import java.util.logging.Level;
public class FactionsPlayerListener implements Listener { public class FactionsPlayerListener implements Listener {
public static HashMap<String, Location> bannerLocations = new HashMap<>(); public static HashMap<String, Location> bannerLocations = new HashMap<>();
@ -201,10 +202,10 @@ public class FactionsPlayerListener implements Listener {
if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getItemInHand().getType() != null) { if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getItemInHand().getType() != null) {
switch (player.getItemInHand().getType()) { switch (player.getItemInHand().getType()) {
case CHEST: case CHEST:
case SIGN_POST: case LEGACY_TRAP_DOOR:
case TRAPPED_CHEST: case TRAPPED_CHEST:
case SIGN: case SIGN:
case WOOD_DOOR: case LEGACY_WOOD_DOOR:
case IRON_DOOR: case IRON_DOOR:
return false; return false;
default: default:
@ -219,7 +220,7 @@ public class FactionsPlayerListener implements Listener {
action = PermissableAction.LEVER; action = PermissableAction.LEVER;
break; break;
case STONE_BUTTON: case STONE_BUTTON:
case WOOD_BUTTON: case LEGACY_WOOD_BUTTON:
action = PermissableAction.BUTTON; action = PermissableAction.BUTTON;
break; break;
case DARK_OAK_DOOR: case DARK_OAK_DOOR:
@ -228,10 +229,10 @@ public class FactionsPlayerListener implements Listener {
case IRON_DOOR: case IRON_DOOR:
case JUNGLE_DOOR: case JUNGLE_DOOR:
case SPRUCE_DOOR: case SPRUCE_DOOR:
case TRAP_DOOR: case LEGACY_TRAP_DOOR:
case WOOD_DOOR: case LEGACY_WOOD_DOOR:
case WOODEN_DOOR: case LEGACY_WOODEN_DOOR:
case FENCE_GATE: case LEGACY_FENCE_GATE:
case ACACIA_FENCE_GATE: case ACACIA_FENCE_GATE:
case BIRCH_FENCE_GATE: case BIRCH_FENCE_GATE:
case DARK_OAK_FENCE_GATE: case DARK_OAK_FENCE_GATE:
@ -265,7 +266,7 @@ public class FactionsPlayerListener implements Listener {
// You may use any block unless it is another faction's territory... // You may use any block unless it is another faction's territory...
if (rel.isNeutral() || (rel.isEnemy() && Conf.territoryEnemyProtectMaterials) || (rel.isAlly() && Conf.territoryAllyProtectMaterials) || (rel.isTruce() && Conf.territoryTruceProtectMaterials)) { if (rel.isNeutral() || (rel.isEnemy() && Conf.territoryEnemyProtectMaterials) || (rel.isAlly() && Conf.territoryAllyProtectMaterials) || (rel.isTruce() && Conf.territoryTruceProtectMaterials)) {
if (!justCheck) { if (!justCheck) {
me.msg(TL.PLAYER_USE_TERRITORY, (material == Material.SOIL ? "trample " : "use ") + TextUtil.getMaterialName(material), otherFaction.getTag(myFaction)); me.msg(TL.PLAYER_USE_TERRITORY, (material == Material.LEGACY_SOIL ? "trample " : "use ") + TextUtil.getMaterialName(material), otherFaction.getTag(myFaction));
} }
return false; return false;
} }
@ -750,7 +751,7 @@ public class FactionsPlayerListener implements Listener {
return; return;
} }
if (e.getItemInHand().getType() == Material.BANNER) { if (e.getItemInHand().getType() == Material.LEGACY_BANNER) {
ItemStack bannerInHand = e.getItemInHand(); ItemStack bannerInHand = e.getItemInHand();
FPlayer fme = FPlayers.getInstance().getByPlayer(e.getPlayer()); FPlayer fme = FPlayers.getInstance().getByPlayer(e.getPlayer());
ItemStack warBanner = fme.getFaction().getBanner(); ItemStack warBanner = fme.getFaction().getBanner();
@ -760,7 +761,7 @@ public class FactionsPlayerListener implements Listener {
warmeta.setLore(P.p.colorList(P.p.getConfig().getStringList("fbanners.Item.Lore"))); warmeta.setLore(P.p.colorList(P.p.getConfig().getStringList("fbanners.Item.Lore")));
warBanner.setItemMeta(warmeta); warBanner.setItemMeta(warmeta);
} else { } else {
warBanner = P.p.createItem(Material.BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore")); warBanner = P.p.createItem(Material.LEGACY_BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore"));
} }
if (warBanner.isSimilar(bannerInHand)) { if (warBanner.isSimilar(bannerInHand)) {

View File

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

View File

@ -1,11 +1,11 @@
package com.massivecraft.factions.util; package com.massivecraft.factions.util;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.util.*; import java.util.*;
import java.util.Map.Entry;
public class VisualizeUtil { public class VisualizeUtil {
@ -25,42 +25,35 @@ public class VisualizeUtil {
} }
@SuppressWarnings("deprecation") @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); getPlayerLocations(player).add(location);
player.sendBlockChange(location, typeId, data); player.sendBlockChange(location, type, data);
} }
@SuppressWarnings("deprecation") @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); 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") @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); Set<Location> ploc = getPlayerLocations(player);
for (Location location : locations) { for (Location location : locations) {
ploc.add(location); ploc.add(location);
player.sendBlockChange(location, typeId, (byte) 0); player.sendBlockChange(location, material, (byte) 0);
} }
} }
@SuppressWarnings("deprecation") @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); Set<Location> ploc = getPlayerLocations(player);
for (Block block : blocks) { for (Block block : blocks) {
Location location = block.getLocation(); Location location = block.getLocation();
ploc.add(location); 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) { for (Location location : locations) {
Block block = location.getWorld().getBlockAt(location); Block block = location.getWorld().getBlockAt(location);
player.sendBlockChange(location, block.getTypeId(), block.getData()); player.sendBlockChange(location, block.getType(), block.getData());
} }
locations.clear(); locations.clear();
} }

View File

@ -95,7 +95,7 @@ public enum PermissableAction {
} }
Material material = Material.matchMaterial(section.getString("materials." + name().toLowerCase().replace('_', '-'))); Material material = Material.matchMaterial(section.getString("materials." + name().toLowerCase().replace('_', '-')));
if (material == null) { if (material == null) {
material = Material.STAINED_CLAY; material = Material.LEGACY_STAINED_CLAY;
} }
Access access = fme.getFaction().getAccess(permissable, this); Access access = fme.getFaction().getAccess(permissable, this);

View File

@ -46,7 +46,7 @@ public class CropUpgrades implements Listener {
private void growCrop(BlockGrowEvent e) { private void growCrop(BlockGrowEvent e) {
if (e.getBlock().getType().equals(Material.CROPS)) { if (e.getBlock().getType().equals(Material.LEGACY_CROPS)) {
e.setCancelled(true); e.setCancelled(true);
Crops c = new Crops(CropState.RIPE); Crops c = new Crops(CropState.RIPE);
org.bukkit.block.BlockState bs = e.getBlock().getState(); org.bukkit.block.BlockState bs = e.getBlock().getState();
@ -54,11 +54,11 @@ public class CropUpgrades implements Listener {
bs.update(); bs.update();
} }
org.bukkit.block.Block below = e.getBlock().getLocation().subtract(0, 1, 0).getBlock(); org.bukkit.block.Block below = e.getBlock().getLocation().subtract(0, 1, 0).getBlock();
if (below.getType() == Material.SUGAR_CANE_BLOCK) { if (below.getType() == Material.LEGACY_SUGAR_CANE_BLOCK) {
org.bukkit.block.Block above = e.getBlock().getLocation().add(0, 1, 0).getBlock(); org.bukkit.block.Block above = e.getBlock().getLocation().add(0, 1, 0).getBlock();
if (above.getType() == Material.AIR && above.getLocation().add(0, -2, 0).getBlock().getType() != Material.AIR) { if (above.getType() == Material.AIR && above.getLocation().add(0, -2, 0).getBlock().getType() != Material.AIR) {
above.setType(Material.SUGAR_CANE_BLOCK); above.setType(Material.LEGACY_SUGAR_CANE_BLOCK);
} }
} }

View File

@ -142,9 +142,6 @@ public class TextUtil {
return material.toString().replace('_', ' ').toLowerCase(); return material.toString().replace('_', ' ').toLowerCase();
} }
public static String getMaterialName(int materialId) {
return getMaterialName(Material.getMaterial(materialId));
}
// -------------------------------------------- // // -------------------------------------------- //
// Material name tools // Material name tools

View File

@ -1,5 +1,6 @@
name: Factions name: Factions
version: ${project.version}-1.4-BETA-6 version: ${project.version}-1.4-BETA-6
api-version: 1.13
main: com.massivecraft.factions.P main: com.massivecraft.factions.P
authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage] authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage]
softdepend: [CoreProtect, PlayerVaults, PlaceholderAPI, MVdWPlaceholderAPI, PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag, dynmap, FactionsTop] softdepend: [CoreProtect, PlayerVaults, PlaceholderAPI, MVdWPlaceholderAPI, PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag, dynmap, FactionsTop]