Package fr.neatmonster.nocheatplus.checks.blockinteract

Examples of fr.neatmonster.nocheatplus.checks.blockinteract.BlockInteractData


    // TODO: Make more precise (workarounds like WATER_LILY, general points).
    // Workaround for signs on cactus and similar.
        final Material againstType = blockAgainst.getType();
        if (againstType == null || againstType == Material.AIR) {
          // Attempt to workaround blocks like cactus.
          final BlockInteractData bdata = BlockInteractData.getData(player);
          if (bdata.lastType != null && bdata.lastX != Integer.MAX_VALUE && TickTask.getTick() == bdata.lastTick && TrigUtil.manhattan(bdata.lastX, bdata.lastY, bdata.lastZ, blockAgainst) == 0) {
            // (Wide screen.)
            // Block was placed against something (e.g. cactus), allow it.
            // TODO: Later reset can conflict, though it makes sense to reset with placing blocks in general.
            bdata.resetLastBlock();
            return false;
          }
        }
        if (BlockProperties.isLiquid(againstType)) {
            if ((placedMat != Material.WATER_LILY || !BlockProperties.isLiquid(block.getRelative(BlockFace.DOWN).getType()))  && !player.hasPermission(Permissions.BLOCKPLACE_AGAINST_LIQUIDS)) {
View Full Code Here

TOP

Related Classes of fr.neatmonster.nocheatplus.checks.blockinteract.BlockInteractData

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.