Package cc.co.evenprime.bukkit.nocheat.data

Examples of cc.co.evenprime.bukkit.nocheat.data.SimpleLocation


        super(plugin, "blockbreak.direction");
    }

    public boolean check(final NoCheatPlayer player, final BlockBreakData data, final BlockBreakConfig ccblockbreak) {

        final SimpleLocation brokenBlock = data.brokenBlockLocation;
        boolean cancel = false;

        // How far "off" is the player with his aim. We calculate from the
        // players eye location and view direction to the center of the target
        // block. If the line of sight is more too far off, "off" will be
View Full Code Here


    public boolean check(NoCheatPlayer player, BlockBreakData data, BlockBreakConfig cc) {

        boolean cancel = false;

        final SimpleLocation brokenBlock = data.brokenBlockLocation;

        // Distance is calculated from eye location to center of targeted block
        // If the player is further away from his target than allowed, the
        // difference will be assigned to "distance"
        final double distance = CheckUtil.reachCheck(player, brokenBlock.x + 0.5D, brokenBlock.y + 0.5D, brokenBlock.z + 0.5D, player.isCreative() ? cc.reachDistance + 2 : cc.reachDistance);
View Full Code Here

    }

    @Override
    public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
        if(wildcard == ParameterName.PLACE_LOCATION) {
            SimpleLocation l = getData(player).blockPlaced;
            if(l.isSet()) {
                return String.format(Locale.US, "%d %d %d", l.x, l.y, l.z);
            } else {
                return "null";
            }
        }

        else if(wildcard == ParameterName.PLACE_AGAINST) {
            SimpleLocation l = getData(player).blockPlacedAgainst;
            if(l.isSet()) {
                return String.format(Locale.US, "%d %d %d", l.x, l.y, l.z);
            } else {
                return "null";
            }
        }
View Full Code Here

    public boolean check(NoCheatPlayer player, BlockPlaceData data, BlockPlaceConfig cc) {

        boolean cancel = false;

        final SimpleLocation placedAgainstBlock = data.blockPlacedAgainst;

        // Distance is calculated from eye location to center of targeted block
        // If the player is further away from his target than allowed, the
        // difference will be assigned to "distance"
        final double distance = CheckUtil.reachCheck(player, placedAgainstBlock.x + 0.5D, placedAgainstBlock.y + 0.5D, placedAgainstBlock.z + 0.5D, player.isCreative() ? cc.reachDistance + 2 : cc.reachDistance);
View Full Code Here

    public boolean check(NoCheatPlayer player, BlockPlaceData data, BlockPlaceConfig cc) {

        boolean cancel = false;

        final SimpleLocation blockPlaced = data.blockPlaced;
        final SimpleLocation blockPlacedAgainst = data.blockPlacedAgainst;

        // How far "off" is the player with his aim. We calculate from the
        // players eye location and view direction to the center of the target
        // block. If the line of sight is more too far off, "off" will be
        // bigger than 0
View Full Code Here

TOP

Related Classes of cc.co.evenprime.bukkit.nocheat.data.SimpleLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.