Example #1
0
  @Override
  protected void onDestroy() {
    final LocalizedStringSet stringSet = raceService.getLocalizedStringSet();
    player.sendMessage(
        Color.LIGHTBLUE,
        stringSet.format(player, "TrackEditor.EndEditingTrackMessage", track.getName()));

    for (MapIcon icon : mapIcons.values()) icon.destroy();
    mapIcons.clear();
  }
Example #2
0
  @Override
  protected void onInit() {

    eventManagerNode.registerHandler(
        PlayerUpdateEvent.class,
        HandlerPriority.NORMAL,
        Attentions.create().object(player),
        (e) -> {
          if (player.getUpdateCount() % 40 == 0) updateMapIcons();
        });

    final LocalizedStringSet stringSet = raceService.getLocalizedStringSet();
    player.sendMessage(
        Color.LIGHTBLUE,
        stringSet.format(player, "TrackEditor.StartEditingTrackMessage", track.getName()));
  }