Package org.mctourney.autoreferee

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


    GoalsInventorySnapshot droppedOff = GoalsInventorySnapshot.fromDiff(diff, true);
    GoalsInventorySnapshot pickedUp = GoalsInventorySnapshot.fromDiff(diff, false);

    if (!droppedOff.isEmpty() && !pickedUp.isEmpty())
    {
      match.addEvent(new TranscriptEvent(match,
          TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
          // {player} has dropped off {snap} and picked up {snap} from a {container} (@ {loc})
          "%s has dropped off %s and picked up %s from a %s (@ %s)", apl.getDisplayName(),
          droppedOff, pickedUp, apl.getInventoryDescription(),
          LocationUtil.toBlockCoords(apl.getInventoryLocation())),
View Full Code Here


          apl.getInventoryLocation(), unpack2(droppedOff, pickedUp, apl)
      ));
    }
    else if (!droppedOff.isEmpty())
    {
      match.addEvent(new TranscriptEvent(match,
          TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
          // {player} has dropped off {snap} in a {container} (@ {loc})
          "%s has dropped off %s in a %s (@ %s)", apl.getDisplayName(),
          droppedOff, apl.getInventoryDescription(),
          LocationUtil.toBlockCoords(apl.getInventoryLocation())),
View Full Code Here

          apl.getInventoryLocation(), unpack(droppedOff, apl)
      ));
    }
    else if (!pickedUp.isEmpty())
    {
      match.addEvent(new TranscriptEvent(match,
          TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
          // {player} has picked up {snap} from a {container} (@ {loc})
          "%s has picked up %s from a %s (@ %s)", apl.getDisplayName(),
          pickedUp, apl.getInventoryDescription(),
          LocationUtil.toBlockCoords(apl.getInventoryLocation())),
View Full Code Here

      AutoRefGoal g = entry.getValue();
      if (b.matchesBlock(block))
      {
        if (g.getItemStatus() != AutoRefGoal.ItemStatus.TARGET
            && g.isSatisfied(match)) {
          match.addEvent(new TranscriptEvent(match,
              TranscriptEvent.EventType.OBJECTIVE_PLACED, String.format(
              "%s has placed the %s on the Victory Monument!",
              apl.getDisplayName(), b.getDisplayName()), block.getLocation(), apl, b
          ));
        } else {
View Full Code Here

              "%s has placed the %s on the Victory Monument!",
              apl.getDisplayName(), b.getDisplayName()), block.getLocation(), apl, b
          ));
        } else {
          // TranscriptEvent.ObjectiveDetailType.PLACE
          match.addEvent(new TranscriptEvent(match,
              TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
              // {player} has placed a {goal} block (@ {loc})
              "%s has placed a %s block (@ %s)", apl.getDisplayName(),
              b.getDisplayName(),
              LocationUtil.toBlockCoords(block.getLocation())),
View Full Code Here

    for (BlockData b : apl.getTeam().getObjectives())
    {
      if (b.matchesBlock(block))
      {
        // TranscriptEvent.ObjectiveDetailType.BREAK_PLAYER
        match.addEvent(new TranscriptEvent(match,
            TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
            // {player} has broken a {goal} block (@ {loc})
            "%s has broken a %s block (@ %s)", apl.getDisplayName(),
            b.getDisplayName(),
            LocationUtil.toBlockCoords(block.getLocation())), block
View Full Code Here

    for (BlockData b : apl.getTeam().getObjectives())
    {
      if (b.equals(item))
      {
        GoalsInventorySnapshot droppedItems = new GoalsInventorySnapshot(event.getItemDrop().getItemStack(), b);
        match.addEvent(new TranscriptEvent(match,
            TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
              // {player} has tossed {snap} (@ {loc})
              "%s has tossed %s (@ %s)", apl.getDisplayName(),
              droppedItems, LocationUtil.toBlockCoords(pl.getLocation())),
            pl.getLocation(), apl, b
View Full Code Here

        .fromItemsAndGoals(ev.getDrops(), apl.getTeam().getObjectives());

    if (snapshot.isEmpty())
    { return; }

    match.addEvent(new TranscriptEvent(
            match,
            TranscriptEvent.EventType.OBJECTIVE_DETAIL,
            // {player} has dropped {snap} when dying (@ {loc})
            String.format("%s has dropped %s when dying (@ %s)",
                apl.getDisplayName(), snapshot, LocationUtil.toBlockCoords(
View Full Code Here

    for (BlockData b : apl.getTeam().getObjectives())
    {
      if (b.equals(item))
      {
        GoalsInventorySnapshot pickupItems = new GoalsInventorySnapshot(event.getItem().getItemStack(), b);
        match.addEvent(new TranscriptEvent(match,
            TranscriptEvent.EventType.OBJECTIVE_DETAIL, String.format(
              // {player} has picked up {snap} (@ {loc})
              "%s has picked up %s (@ %s)", apl.getDisplayName(),
              pickupItems, LocationUtil.toBlockCoords(pl.getLocation())),
            pl.getLocation(), apl, b
View Full Code Here

    if (snap.isEmpty()) return;

    if (currentResponsibleTntPlayer != null)
    {
      // TranscriptEvent.ObjectiveDetailType.BREAK_PLAYER
      match.addEvent(new TranscriptEvent(
          match,
          TranscriptEvent.EventType.OBJECTIVE_DETAIL,
          // {entity} has exploded {snap} block(s) in {area} (@ {loc})
          String.format("%s has exploded %s block(s) in %s (@ %s)", causeStr, snap,
              getLocationDescription(loc, match), LocationUtil.toBlockCoords(loc)),
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.