2015-10-19 17:43:46 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.util;
|
2014-07-20 01:02:00 +00:00
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
import org.bukkit.Material;
|
|
|
|
import org.bukkit.OfflinePlayer;
|
|
|
|
import org.bukkit.Server;
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.entity.EntityType;
|
|
|
|
import org.bukkit.entity.LivingEntity;
|
|
|
|
import org.bukkit.material.MaterialData;
|
|
|
|
|
|
|
|
@SuppressWarnings("deprecation")
|
2015-10-19 17:43:46 +00:00
|
|
|
public class DepreciationAggregator
|
2014-07-20 01:02:00 +00:00
|
|
|
{
|
|
|
|
public static Block getTargetBlock(LivingEntity entity, HashSet< Byte> transparent, int maxDistance)
|
|
|
|
{
|
|
|
|
return entity.getTargetBlock(transparent, maxDistance);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static OfflinePlayer getOfflinePlayer(Server server, String name)
|
|
|
|
{
|
|
|
|
return server.getOfflinePlayer(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Material getMaterial(int id)
|
|
|
|
{
|
|
|
|
return Material.getMaterial(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static byte getData_MaterialData(MaterialData md)
|
|
|
|
{
|
|
|
|
return md.getData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void setData_MaterialData(MaterialData md, byte data)
|
|
|
|
{
|
|
|
|
md.setData(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static byte getData_Block(Block block)
|
|
|
|
{
|
|
|
|
return block.getData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void setData_Block(Block block, byte data)
|
|
|
|
{
|
|
|
|
block.setData(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static org.bukkit.material.Lever makeLeverWithData(byte data)
|
|
|
|
{
|
|
|
|
return new org.bukkit.material.Lever(Material.LEVER, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static int getTypeId_Block(Block block)
|
|
|
|
{
|
|
|
|
return block.getTypeId();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String getName_EntityType(EntityType et)
|
|
|
|
{
|
|
|
|
return et.getName();
|
|
|
|
}
|
|
|
|
}
|