Package org.spout.vanilla.component.entity.player

Examples of org.spout.vanilla.component.entity.player.PlayerInteract


    if (!isPressed(args)) {
      return;
    }
    args.assertCompletelyParsed();

    PlayerInteract hit = ((Player) source).get(PlayerInteract.class);
    if (hit != null) {
      final Block hitting = hit.getTargetBlock();
      if (hitting != null && !hitting.getMaterial().equals(VanillaMaterials.AIR)) {
        client.getScheduler().safeRun(VanillaPlugin.getInstance(), new Runnable() {
          @Override
          public void run() {
            hitting.setMaterial(VanillaMaterials.AIR);
View Full Code Here


    if (!isPressed(args)) {
      return;
    }
    args.assertCompletelyParsed();

    PlayerInteract hit = ((Player) source).get(PlayerInteract.class);
    if (hit != null) {
      Block hitting = hit.getTargetBlock(true);
      if (hitting != null && !hitting.getMaterial().equals(VanillaMaterials.AIR)) {
        client.getLogger().info(hitting.getMaterial().getName());
        selection = hitting.getMaterial();
      }
    }
View Full Code Here

    if (!isPressed(args)) {
      return;
    }
    args.assertCompletelyParsed();

    PlayerInteract hit = ((Player) source).get(PlayerInteract.class);
    if (hit != null) {
      final Block hitting = hit.getTargetBlock();
      if (hitting != null && selection != null && !hitting.getMaterial().equals(VanillaMaterials.AIR)) {
        final BlockFace clicked = hit.getTargetFace();
        System.out.println(clicked);
        if (clicked == null) {
          return;
        }
        client.getLogger().info(clicked.name());
View Full Code Here

TOP

Related Classes of org.spout.vanilla.component.entity.player.PlayerInteract

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.