Package org.spout.api.entity

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


      } 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) {
      player.sendMessage("Error occurred while parsing value " + value);
      player.sendMessage(t.getMessage());
    }
  }
View Full Code Here


        return;
      }
      nearest.getData().put(key, newValue);
      player.sendMessage("Value of " + key + " set to " + newValue);
    } catch (Throwable t) {
      player.sendMessage("Error occurred while parsing value " + value);
      player.sendMessage(t.getMessage());
    }
  }

  @CommandDescription (aliases = "spawn", desc = "Spawns a living entity at your location")
View Full Code Here

      }
      nearest.getData().put(key, newValue);
      player.sendMessage("Value of " + key + " set to " + newValue);
    } catch (Throwable t) {
      player.sendMessage("Error occurred while parsing value " + value);
      player.sendMessage(t.getMessage());
    }
  }

  @CommandDescription (aliases = "spawn", desc = "Spawns a living entity at your location")
  @Filter (PlayerFilter.class)
View Full Code Here

    ops.setOp(playerName, false);
    source.sendMessage(plugin.getPrefix() + playerName + ChatStyle.RED + " had their operator status revoked!");
    if (getEngine() instanceof Server) {
      Player player = ((Server) getEngine()).getPlayer(playerName, true);
      if (player != null && !source.equals(player)) {
        player.sendMessage(plugin.getPrefix() + ChatStyle.RED + "You had your operator status revoked!");
      }
    }
  }

  @CommandDescription (aliases = {"op"}, usage = "<player>", desc = "Make a player an operator")
View Full Code Here

    ops.setOp(playerName, true);
    source.sendMessage(plugin.getPrefix() + ChatStyle.RED + playerName + " is now an operator!");
    if (getEngine() instanceof Server) {
      Player player = ((Server) getEngine()).getPlayer(playerName, true);
      if (player != null && !source.equals(player)) {
        player.sendMessage(plugin.getPrefix() + ChatStyle.YELLOW + "You are now an operator!");
      }
    }
  }

  @CommandDescription (aliases = {"time"}, usage = "<add|set> <0-24000|day|night|dawn|dusk> [world]", desc = "Set the time of the server")
View Full Code Here

    final World world = player.getWorld();
    final Sky sky = world.get(Sky.class);

    for (Entity e : world.getNearbyEntities(player, NEARBY_MONSTER_RANGE)) {
      if (e.get(Living.class) instanceof Hostile) {
        player.sendMessage(NEARBY_MONSTER_MESSAGE);
        return;
      }
    }

    if (sky != null && sky.getTime() < Time.DUSK.getTime()) {
View Full Code Here

        return;
      }
    }

    if (sky != null && sky.getTime() < Time.DUSK.getTime()) {
      player.sendMessage(NOT_NIGHT_MESSAGE);
      return;
    }

    if (isOccupied(head)) {
      player.sendMessage(OCCUPIED_MESSAGE);
View Full Code Here

      player.sendMessage(NOT_NIGHT_MESSAGE);
      return;
    }

    if (isOccupied(head)) {
      player.sendMessage(OCCUPIED_MESSAGE);
      return;
    }

    sleep.sleep(head);
  }
View Full Code Here

    if (level == null) {
      throw new CommandException(player.getDisplayName() + " does not have experience.");
    }

    level.addExperience(amount);
    player.sendMessage(plugin.getPrefix() + ChatStyle.GREEN + "Your experience has been set to " + ChatStyle.WHITE + amount + ChatStyle.GREEN + ".");
  }

  @CommandDescription (aliases = "weather", usage = "<0|1|2|clear|rain|thunder> (0 = CLEAR, 1 = RAIN/SNOW, 2 = THUNDERSTORM) [world]", desc = "Changes the weather")
  @Permissible ("vanilla.command.weather")
  public void weather(CommandSource source, CommandArguments args) throws CommandException {
View Full Code Here

    if (state != PlayerDiggingMessage.STATE_DROP_ITEM && state != PlayerDiggingMessage.STATE_SHOOT_ARROW_EAT_FOOD) {
      Collection<Protection> protections = player.getEngine().getServiceManager().getRegistration(ProtectionService.class).getProvider().getAllProtections(point);
      for (Protection p : protections) {
        if (p.contains(point) && !human.isOp()) {
          player.getNetwork().getSession().send(new BlockChangeMessage(x, y, z, minecraftID, block.getBlockData() & 0xF, rm));
          player.sendMessage(ChatStyle.DARK_RED + "This area is a protected spawn point!");
          return;
        }
      }
    }
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.