Skip to content
granny edited this page Sep 14, 2024 · 5 revisions

File Structure

📁Pl3xMap
├─── colors.yml
├─── config.yml
├─ 📁layers
│    ├── players.yml <-- you are here
│    ├── spawn.yml
│    └── worldborder.yml
├─ 📁locale
│    └── lang-en.yml
├─ 📁markers
│    └── 📁 <world directories>
│           └── <custom marker>
└─ 📁web
     └── <webmap files>

players.yml

settings:
  # Show online players on the map and sidebar.
  enabled: true
  hide:
    # Should invisible players be hidden from the map.
    invisible: true
    # Should spectators be hidden from the map.
    spectators: true
  layer:
    # Whether the players layer control shows up in the layers list or not.
    show-controls: true
    # Whether the players layer should be hidden (toggled off) by default.
    default-hidden: false
    # Priority order players layer shows up in the layers list.
    # (lower values = higher in the list)
    priority: 20
    # Z-Index order players layer shows up in the map.
    # (higher values are drawn on top of lower values)
    z-index: 999
    # How often (in seconds) to update the marker.
    # Setting to 0 is the same as setting it to 1.
    update-interval: 0
    # Whether to push this layer through SSE or not.
    live-update: true
  # The player icon.
  # Icon must be in the web/images/icon/ directory.
  icon: players
  # Tooltip for player markers.
  # Variables: uuid, name, decoratedName, health, armor
  tooltip: |-
    <ul>
      <li><img src='images/skins/2D/<uuid>.png' class='head' alt='<name>' /></li>
      <li>
        <name>
        <img src='images/clear.png' class='health' style='background-position:0 calc(-<health>px * 9);' alt='Health <health>' />
        <img src='images/clear.png' class='armor' style='background-position:0 calc(-<armor>px * 9);' alt='Armor <armor>' />
      </li>
    </ul>
  # The custom pane layer for the player tracker.
  # This is used to make custom css styled tooltips.
  # (see css setting below)
  pane: nameplates
  # Custom css for players marker layer.
  # Class names use the pane name set above.
  css: |-
    div.leaflet-nameplates-pane div img.head {
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      -ms-interpolation-mode: nearest-neighbor;
    }
    div.leaflet-nameplates-pane div {
      margin: 0;
      padding: 0;
      color: #ffffff;
      font-weight: 700;
      line-height: 1rem;
      background: rgba(0, 0, 0, 0.5);
      border-color: rgba(0, 0, 0, 0.75);
    }
    div.leaflet-nameplates-pane div ul {
      padding: 3px;
    }
    div.leaflet-nameplates-pane div:before {
      border-color: transparent;
    }
    div.leaflet-nameplates-pane div img.head {
      vertical-align: middle;
      width: 32px;
      height: 32px;
      border-radius: 5px;
      border: 1px solid black;
    }
    div.leaflet-nameplates-pane div img.health {
      margin-top: 3px;
    }
    div.leaflet-nameplates-pane div img.armor,
    div.leaflet-nameplates-pane div img.health {
      display: block;
      width: 81px;
      height: 9px;
      background-position: 0 0;
    }
    div.leaflet-nameplates-pane div img.armor {
      background: url('images/armor.png') no-repeat;
    }
    div.leaflet-nameplates-pane div img.health {
      background: url('images/health.png') no-repeat;
    }
    div.leaflet-nameplates-pane div,
    div.leaflet-marker-pane img {
      transition: all 0.25s;
    }