package info.tregmine.commands;

import org.bukkit.block.Block;
import org.bukkit.Location;
import org.bukkit.Material;
import info.tregmine.Tregmine;
import info.tregmine.api.TregminePlayer;

public class BlockHereCommand extends AbstractCommand
{
    public BlockHereCommand(Tregmine tregmine)
    {
        super(tregmine, "blockhere");
    }

    @Override
    public boolean handlePlayer(TregminePlayer player, String[] args)
    {
        if (!player.getRank().canFill()) {
            return true;
        }

        Location loc = player.getLocation();
        Block block = player.getWorld().getBlockAt(loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ());
        block.setType(Material.DIRT);

        return true;
    }
}

package info.tregmine.commands;

import org.bukkit.block.Block;
import org.bukkit.Material;
import info.tregmine.Tregmine;
import info.tregmine.api.TregminePlayer;

public class BlockHereCommand extends AbstractCommand
{
    public BlockHereCommand(Tregmine tregmine)
    {
        super(tregmine, "blockhere");
    }

    @Override
    public boolean handlePlayer(TregminePlayer player, String[] args)
    {
        if (!player.getRank().canFill()) {
            return true;
        }

        Block block = player.getWorld().getBlockAt(player.getLocation());
        block.setType(Material.DIRT);

        return true;
    }
}

Revert "Modified /blockghere so it places block beneath player"
Revert "Modified /blockghere so it places block beneath player"

This reverts commit cecd55798926768236464c8782071cbd253f848a.
