Removed old block place workaround code.

This commit is contained in:
GJ 2012-03-25 16:13:29 -04:00
parent d8dbce7cc9
commit 0ee05687d9

View File

@ -97,17 +97,8 @@ public class mcBlockListener implements Listener {
*/ */
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockPlace(BlockPlaceEvent event) { public void onBlockPlace(BlockPlaceEvent event) {
Block block; Block block = event.getBlock();
Player player = event.getPlayer(); Player player = event.getPlayer();
//When blocks are placed on snow this event reports the wrong block.
if (event.getBlockReplacedState() != null && event.getBlockReplacedState().getType().equals(Material.SNOW)) {
block = event.getBlockAgainst();
}
else {
block = event.getBlock();
}
int id = block.getTypeId(); int id = block.getTypeId();
Material mat = block.getType(); Material mat = block.getType();