Package org.spout.api.entity

Examples of org.spout.api.entity.Player.sendMessage()


    float duration = (float) args.popDouble("duration");
    int amp = args.popInteger("amp", 2);
    args.assertCompletelyParsed();

    player.add(Effects.class).add(new EntityEffect(type, amp, duration));
    player.sendMessage(ChatStyle.GREEN + "Applied effect '" + type + "' with amplitude '" + amp + "' for '" + duration + "' seconds.");
  }

  @CommandDescription (aliases = {"testscoreboard", "tsb"}, desc = "Not to be confused with '/scoreboard'")
  @Permissible ("vanilla.command.debug")
  @Filter (PlayerFilter.class)
View Full Code Here


      for (int i = 0; i < 100; i++) {
        startPosition = startPosition.add(offset);
        GeneralEffects.NOTE_PARTICLE.playGlobal(startPosition);
      }
      final Vector3f axesAngles = rotation.getAxesAngleDeg();
      player.sendMessage("Yaw = " + axesAngles.getY());
      player.sendMessage("Pitch = " + axesAngles.getX());
    } else if (action.contains("packets")) {
      player.add(ForceMessages.class);
    } else {
      if (getEngine() instanceof Client) {
View Full Code Here

        startPosition = startPosition.add(offset);
        GeneralEffects.NOTE_PARTICLE.playGlobal(startPosition);
      }
      final Vector3f axesAngles = rotation.getAxesAngleDeg();
      player.sendMessage("Yaw = " + axesAngles.getY());
      player.sendMessage("Pitch = " + axesAngles.getX());
    } else if (action.contains("packets")) {
      player.add(ForceMessages.class);
    } else {
      if (getEngine() instanceof Client) {
        throw new CommandException("You cannot resend chunks in client mode.");
View Full Code Here

          break;
        }
      }
    }
    if (nearest == null) {
      player.sendMessage("Could not find a near Entity you are looking at.");
      return;
    }

    // Send entity information
    Descriptor desc = nearest.get(Descriptor.class);
View Full Code Here

    }

    // Send entity information
    Descriptor desc = nearest.get(Descriptor.class);
    if (desc == null) {
      player.sendMessage("Selected Entity: Unknown");
    } else {
      player.sendMessage("Selected Entity: " + desc.getDescription());
    }

    Object currentValue = nearest.getData().get(key);
View Full Code Here

    // Send entity information
    Descriptor desc = nearest.get(Descriptor.class);
    if (desc == null) {
      player.sendMessage("Selected Entity: Unknown");
    } else {
      player.sendMessage("Selected Entity: " + desc.getDescription());
    }

    Object currentValue = nearest.getData().get(key);
    if (value == null || value.isEmpty()) {
      if (nearest.getData().containsKey(key)) {
View Full Code Here

    }

    Object currentValue = nearest.getData().get(key);
    if (value == null || value.isEmpty()) {
      if (nearest.getData().containsKey(key)) {
        player.sendMessage(key + " = " + currentValue);
      } else {
        player.sendMessage("No value is mapped to " + key + " for this Entity");
      }
      return;
    }
View Full Code Here

    Object currentValue = nearest.getData().get(key);
    if (value == null || value.isEmpty()) {
      if (nearest.getData().containsKey(key)) {
        player.sendMessage(key + " = " + currentValue);
      } else {
        player.sendMessage("No value is mapped to " + key + " for this Entity");
      }
      return;
    }

    // Figure out what type the key is using VanillaData
View Full Code Here

      }
    }
    // Try using the current value in the datamap
    if (valueType == null) {
      if (currentValue == null) {
        player.sendMessage("Could not figure out the type of value stored by " + key);
        return;
      } else {
        valueType = currentValue.getClass();
      }
    }
View Full Code Here

      } else if (Byte.class.isAssignableFrom(valueType)) {
        newValue = Byte.parseByte(value);
      } else if (String.class.isAssignableFrom(valueType)) {
        newValue = value;
      } else {
        player.sendMessage("No idea how to turn " + value + " into " + valueType.getSimpleName());
        return;
      }
      nearest.getData().put(key, newValue);
      player.sendMessage("Value of " + key + " set to " + newValue);
    } catch (Throwable t) {
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.