Examples of inStartRegion()


Examples of org.mctourney.autoreferee.AutoRefMatch.inStartRegion()

    AutoRefPlayer apl = match.getPlayer(player);
    if (apl == null)
    {
      // if the player is not on a team and has left the start area, teleport back
      if (!match.isSpectator(player) && !match.inStartRegion(event.getTo()) && onGround)
      {
        player.teleport(match.getWorldSpawn());
        player.setFallDistance(0.0f);
      }
      return;
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefMatch.inStartRegion()

    double fallspeed = event.getFrom().getY() - event.getTo().getY();
    Location exit = apl.getExitLocation();

    // don't bother if the player isn't in survival mode
    if (player.getGameMode() != GameMode.SURVIVAL
      || match.inStartRegion(event.getTo())) return;

    // if a player leaves the start region...
    if (!match.inStartRegion(event.getTo()))
    {
      if (match.getCurrentState().inProgress())
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefMatch.inStartRegion()

    // don't bother if the player isn't in survival mode
    if (player.getGameMode() != GameMode.SURVIVAL
      || match.inStartRegion(event.getTo())) return;

    // if a player leaves the start region...
    if (!match.inStartRegion(event.getTo()))
    {
      if (match.getCurrentState().inProgress())
      {
        // if they are leaving the start region, clear everything
        if (match.inStartRegion(event.getFrom()) && !apl.isActive()) apl.reset();
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefMatch.inStartRegion()

    if (!match.inStartRegion(event.getTo()))
    {
      if (match.getCurrentState().inProgress())
      {
        // if they are leaving the start region, clear everything
        if (match.inStartRegion(event.getFrom()) && !apl.isActive()) apl.reset();

        // one way or another, the player is now active
        apl.setActive();
      }
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefMatch.inStartRegion()

      boolean hasBed = event.getPlayer().getBedSpawnLocation() != null;

      // if the player attempts to respawn in a different world, bring them back
      Location respawnLocation = event.getRespawnLocation();
      boolean changeRespawn = !hasBed || respawnLocation.getWorld() != match.getWorld() ||
        match.inStartRegion(respawnLocation);
      if (changeRespawn) event.setRespawnLocation(match.getPlayerSpawn(event.getPlayer()));

      // setup respawn for the player
      match.getPlayer(event.getPlayer()).respawn();
    }
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefMatch.inStartRegion()

    {
      String[] lines = ((Sign) event.getClickedBlock().getState()).getLines();
      if (lines[0] == null || !"[AutoReferee]".equals(lines[0])) return;

      if (match != null && match.getCurrentState().isBeforeMatch() &&
        match.inStartRegion(event.getClickedBlock().getLocation()))
      {
        // execute the command on the sign (and hope like hell that AutoReferee picks it up)
        if (event.getAction() == Action.RIGHT_CLICK_BLOCK)
          player.performCommand(ChatColor.stripColor(lines[1] + " " + lines[2]).trim());
        event.setCancelled(true);
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.