Examples of needsParameters()


Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

    // TODO: set data.set-back ? or something: still some aji here.
   
    // Return the reset position.
    data.passableVL += 1d;
    final ViolationData vd = new ViolationData(this, player, data.passableVL, 1, cc.passableActions);
    if (cc.debug || vd.needsParameters()) {
      vd.setParameter(ParameterName.BLOCK_ID, "" + to.getTypeId());
      if (!tags.isEmpty()) {
        vd.setParameter(ParameterName.TAGS, tags);
      }
    }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

            data.morePacketsVehicleVL = -data.morePacketsVehicleBuffer;

            // Execute whatever actions are associated with this check and the violation level and find out if we should
            // cancel the event.
            final ViolationData vd = new ViolationData(this, player, data.morePacketsVehicleVL, -data.morePacketsVehicleBuffer, cc.morePacketsVehicleActions);
            if (cc.debug || vd.needsParameters()) {
              vd.setParameter(ParameterName.PACKETS, Integer.toString(-data.morePacketsVehicleBuffer));
            }
            if (executeActions(vd)){
              newTo = data.getMorePacketsVehicleSetBack();
            }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

            if (data.fastBreakPenalties.score(cc.fastBreakBucketFactor) > cc.fastBreakGrace) {
              // TODO: maybe add one absolute penalty time for big amounts to stop breaking until then
                final double vlAdded = (double) missingTime / 1000.0;
              data.fastBreakVL += vlAdded;
              final ViolationData vd = new ViolationData(this, player, data.fastBreakVL, vlAdded, cc.fastBreakActions);
              if (vd.needsParameters()) {
                vd.setParameter(ParameterName.BLOCK_TYPE, blockType.toString());
                vd.setParameter(ParameterName.BLOCK_ID, Integer.toString(BlockProperties.getId(blockType)));
              }
              cancel = executeActions(vd);
            }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

                    }
                   
                    // Execute whatever actions are associated with this check and the violation level and find out if we
                    // should cancel the event.
                    final ViolationData vd = new ViolationData(this, player, data.criticalVL, delta, cc.criticalActions);
                    if (vd.needsParameters()){
                      if (dataM.sfLowJump){
                        tags.add("sf_lowjump");
                      }
                      vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
                    }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

    {
        // Increment violation level.
        data.survivalFlyVL += result;
        data.sfVLTime = now;
        final ViolationData vd = new ViolationData(this, player, data.survivalFlyVL, result, cc.survivalFlyActions);
        if (vd.needsParameters()) {
            vd.setParameter(ParameterName.LOCATION_FROM, String.format(Locale.US, "%.2f, %.2f, %.2f", from.getX(), from.getY(), from.getZ()));
            vd.setParameter(ParameterName.LOCATION_TO, String.format(Locale.US, "%.2f, %.2f, %.2f", to.getX(), to.getY(), to.getZ()));
            vd.setParameter(ParameterName.DISTANCE, String.format(Locale.US, "%.2f", TrigUtil.distance(from, to)));
            vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
        }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

        data.survivalFlyVL += cc.sfHoverViolation;

        // TODO: Extra options for set-back / kick, like vl?
        data.sfVLTime = System.currentTimeMillis();
        final ViolationData vd = new ViolationData(this, player, data.survivalFlyVL, cc.sfHoverViolation, cc.survivalFlyActions);
        if (vd.needsParameters()) {
            vd.setParameter(ParameterName.LOCATION_FROM, String.format(Locale.US, "%.2f, %.2f, %.2f", loc.getX(), loc.getY(), loc.getZ()));
            vd.setParameter(ParameterName.LOCATION_TO, "(HOVER)");
            vd.setParameter(ParameterName.DISTANCE, "0.0(HOVER)");
            vd.setParameter(ParameterName.TAGS, "hover");
        }
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

                data.creativeFlyVL += result;

                // Execute whatever actions are associated with this check and the violation level and find out if we
                // should cancel the event.
                final ViolationData vd = new ViolationData(this, player, data.creativeFlyVL, result, cc.creativeFlyActions);
                if (vd.needsParameters()) {
                    vd.setParameter(ParameterName.LOCATION_FROM, String.format(Locale.US, "%.2f, %.2f, %.2f", from.getX(), from.getY(), from.getZ()));
                    vd.setParameter(ParameterName.LOCATION_TO, String.format(Locale.US, "%.2f, %.2f, %.2f", to.getX(), to.getY(), to.getZ()));
                    vd.setParameter(ParameterName.DISTANCE, String.format(Locale.US, "%.2f", TrigUtil.distance(from,  to)));
                }
                if (executeActions(vd)) {
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

            // Increment violation level.
            data.morePacketsVL = violation; // TODO: Accumulate somehow [e.g. always += 1, decrease with continuous moving without violation]?
           
            // Violation handling.
            final ViolationData vd = new ViolationData(this, player, data.morePacketsVL, violation, cc.morePacketsActions);
            if (cc.debug || vd.needsParameters()) {
              vd.setParameter(ParameterName.PACKETS, Integer.toString(new Double(violation).intValue()));
              vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
            }
            if (executeActions(vd)) {
              // Set to cancel the move.
View Full Code Here

Examples of fr.neatmonster.nocheatplus.checks.ViolationData.needsParameters()

   */
  private boolean handleViolation(final Player player, final long violationTime, final BlockPlaceData data) {
    final double addedVL = 10.0 * Math.min(maxEditTime, violationTime) / maxEditTime;
    data.autoSignVL += addedVL;
    final ViolationData vd = new ViolationData(this, player, data.autoSignVL, addedVL, BlockPlaceConfig.getConfig(player).autoSignActions);
    if (vd.needsParameters()){
      vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
    }
    return executeActions(vd);
  }
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.