Merge pull request #53 from Mineplex-LLC/feature/logitech-brand

Changed design of billboard and fixed its centering in hubs
This commit is contained in:
Conrad 2016-05-05 18:33:15 -04:00
commit 55d40a1a6b
2 changed files with 26 additions and 3 deletions

View File

@ -3,6 +3,8 @@ package mineplex.core.sponsorbranding;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.List; import java.util.List;
import mineplex.core.common.util.UtilMath;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Location; import org.bukkit.Location;
@ -178,8 +180,29 @@ public class BrandingPost
if (set.getBlock().getType() == Material.STAINED_CLAY) if (set.getBlock().getType() == Material.STAINED_CLAY)
continue; continue;
set.getBlock().setType(Material.WOOD); if (UtilMath.offset2d(corner3.getBlock().getLocation(), set.getBlock().getLocation()) == 0 || UtilMath.offset2d(corner4.getBlock().getLocation(), set.getBlock().getLocation()) == 0)
set.getBlock().setData((byte)1); {
if (corner3.getBlockY() != set.getBlockY() && corner4.getBlockY() != set.getBlockY())
{
Material type = Material.COBBLE_WALL;
if (_center.getBlockY() == set.getBlockY())
{
type = Material.FENCE;
}
set.getBlock().setType(type);
continue;
}
}
byte data = (byte)5;
if (set.getBlockY() == corner4.getBlockY())
{
data = (byte)13;
}
set.getBlock().setType(Material.STEP);
set.getBlock().setData(data);
} }
} }
} }

View File

@ -31,7 +31,7 @@ public class BillboardManager extends MiniPlugin
private void generateBoards() private void generateBoards()
{ {
_branding.createPost(new Location(Bukkit.getWorld("world"), -2, 77, -33), BlockFace.SOUTH, "logitech.jpg"); _branding.createPost(new Location(Bukkit.getWorld("world"), -5, 79, -35), BlockFace.SOUTH, "logitech.jpg");
} }
@EventHandler @EventHandler