PHPackages                             hebbinkpro/pocketmap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hebbinkpro/pocketmap

ActiveProject[Utility &amp; Helpers](/categories/utility)

hebbinkpro/pocketmap
====================

A dynamic web-based world map for PocketMine-MP servers.

0.6.4(3mo ago)1861[1 issues](https://github.com/Hebbinkpro/PocketMap/issues)GPL-3.0-onlyPHPCI passing

Since Jul 5Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Hebbinkpro/PocketMap)[ Packagist](https://packagist.org/packages/hebbinkpro/pocketmap)[ RSS](/packages/hebbinkpro-pocketmap/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (34)Used By (0)

PocketMap
=========

[](#pocketmap)

Warning

This plugin uses the [PMMP WebServer](https://github.com/Hebbinkpro/pmmp-webserver) viron which contains a critical security vulnerability. All versions of this plugin released before **v0.6.4** are affected. Please update the plugin to ensure that the PMMP WebServer virion uses version **v0.5.4 or later** as soon as possible.

A dynamic web-based world map for PocketMine-MP servers.
For a full overview over all functions of the plugin, go to the [documentation](#documentation)

What is new in v0.5
-------------------

[](#what-is-new-in-v05)

- The `/pocketmap` (or `/pmap`) command is now available, the previous commands (`/render` and `/reload`) are now sub-commands!
    - For a list of all available commands, use: `/pmap help`
- Markers - Now you can mark spots on your map with icons using commands (`/pmap marker`).

Go to the [changelogs](https://github.com/Hebbinkpro/PocketMap/blob/main/changelogs/v0.5.md)

How to install
--------------

[](#how-to-install)

1. Download the newest version of the plugin from [Poggit CI](https://poggit.pmmp.io/ci/Hebbinkpro/PocketMap)
2. Place the plugin in the plugins folder of your PocketMine-MP server
3. Restart your server, this will load the plugin data.

    - If you are not hosting your server locally, you have to allocate a new port to your server.

    1. Allocate a new port for your server. If you don't know how to do this, contact your hosting provider.
    2. Go to the `config.yml` and change `web-server.port` to your new allocated port (replace `3000`).
    3. Restart your server again.
4. Go to `http://:` to see the map.

- The default webserver port is `3000`, so if you haven't changed it, use this port.

How to use
----------

[](#how-to-use)

### Render a full world

[](#render-a-full-world)

If you have already created a world, and it is not yet (completely) visible on PocketMap, do the following:

- Execute `/pmap render full `This will start a full world render for the given world. It can take a while before the complete map is loaded, and if your server stops/restart during the full render you have to start the full render again.

### Render new chunks

[](#render-new-chunks)

When you load new chunks in your world which have not been added to the map, the chunks will automatically be rendered.
If there are still chunks missing, make a full render of the world by executing `/pmap render full `

### Render updated chunks

[](#render-updated-chunks)

When a player breaks or places blocks, the map will automatically be updated after some time.

### Change rendering speed

[](#change-rendering-speed)

If the rendering speed is too slow for you, or your server can't handle it anymore, you can change some values in the `config.yml` to resolve these issues.

- Go to the `config.yml`
- Look in the settings under `renderer`
- If you want to alter the rendering speed, change some values in `scheduler`
- If you want to alter the rendering speed of updated chunks, change values in `chunk-scheduler`

Issues
------

[](#issues)

Please report all issues you encounter [here](https://github.com/Hebbinkpro/PocketMap/issues).

TO DO
-----

[](#to-do)

This is a list of all things that have to be added before the release of v1.0.0

### Commands

[](#commands)

- Create fork of Commando to make use of commands with different argument overloads
- Add an `x z` (vector 2) argument type instead of `x y z` (vector 3)

### WebPage

[](#webpage)

- List of all online players
- Option to hide map icons
    - markers, players, etc
- Cleaner UI
- Show time in the world

### Renderer

[](#renderer)

- Better visualization of height difference
- Block Lighting
- Test/add support for other dimensions

### API

[](#api)

- Support for plugins to add their own API's to PocketMap
    - Let a plugin register files to `/api/`
- Support for JS modules to extend the functionality of the web page.
    - These modules can be used to access a plugin's API endpoint on the web server.
- Add better documentation for the `MarkerManager` class such that plugins are able to make use of the build in marker system.

Credits
-------

[](#credits)

- [PMMP WebServer](https://github.com/Hebbinkpro/pmmp-webserver) by me for creating the website and API.
- [LibSkin](https://github.com/HimbeersaftLP/LibSkin) by HimbeersaftLP for player heads.
- [Commando](https://github.com/Paroxity/Commando) fork by Paroxity for commands.
- [SimplePacketHandler](https://github.com/Muqsit/SimplePacketHandler/tree/pm5) by Muqsit for Commando.
- [Bedrock Samples](https://github.com/Mojang/bedrock-samples) by Mojang for the latest block textures used in the map
- [Leaflet.js](https://leafletjs.com/) for the interactive map
- [OpenMoji](https://openmoji.org/) for a large range of default icons

Documentation
=============

[](#documentation)

This is the documentation of a lot of the PocketMap features.

- [Commands](#commands)
- [Web Map](#web-map)
- [Textures](#textures)
- [Markers](#markers)

Commands
--------

[](#commands-1)

### Command Arguments

[](#command-arguments)

Some commands also need arguments, the following argument types are provided in this readme:

- `< ... >`: required
- `{ ... }`: optional for players but required for console, current location of the player is used when not provided
- `[ ... ]`: optional, default values will be used

### Help Command

[](#help-command)

Get a list of all command. Usage: `/pmap help`

### Marker Command

[](#marker-command)

Usage: `/pmap marker`

#### Common command arguments

[](#common-command-arguments)

- `name`: Name of the marker, required.
- `world`: Name of the world the marker is in
- `id`: Custom identifier for a marker
- `position`: Position (`x y z`)
- `icon`: Name of the icon defined in `markers/icons.json`
    - Look [here](resources/markers/README.md) for more info about adding your own markers.
- `pos1`: First position (`x y z`)
- `pos2`: Second position (`x y z`)

#### Add Markers Command

[](#add-markers-command)

Add markers to you map

- Icon markers: `/pmap marker add icon   {position} {world} [id]`
    - Create an icon marker on the given position
- Circle markers: `/pmap marker add circle   {position} {world} [id]`
    - `radius`: The radius (in blocks) of the circle, required
    - Create a circle with the given radius at the given position
- Area Markers: `/pmap marker add area   {pos2} {world} [id]`
    - Create a rectangular area with `pos1` and `pos2` as corners
- Line Markers: `/pmap marker add line   {pos2} {world} [id]`
    - Create a line between `pos1` and `pos2`

#### Remove Markers Command

[](#remove-markers-command)

You can remove any marker with the marker remove command. Usage: `/pmap marker remove  {world}`

- You can only remove markers which have there `id` defined in `markers/markers.json`.

### Reload Command

[](#reload-command)

Reload some parts of the plugin data, this will apply most changes in the running plugin.

- Not all changes will be applied with this command, to make sure all changes are applied, a restart is recommanded.

Available parts:

- `config`: Reload the plugin config
- `data`: Reload the folder structure
- `web`: Reload the web config

Usage: `/pmap reload `

### Render Command

[](#render-command)

You can render a specific area of the map by using the render command.
Usage: `/pmap render {x} {z} {world} {zoom}`

- `x`: The x coordinate of the region
- `z`: The z coordinate of the region
- `world`: THe world name of the region
- `zoom`: The zoom level of the region in the interval \[0,8\], where `zoom` is an area of `2zoom * 2zoom` chunks (0=1 chunk, 8=256\*256 chunks)

#### Full Render Command

[](#full-render-command)

Start a full world render for the given world.
Usage: `/pmap render full {world}`

#### Render Lookup Command

[](#render-lookup-command)

Lookup the chunk and region coordinates of a given world position.
Usage: `/pmap render lookup {x y z} [zoom]`

- `x y z` is the position in the world
- `zoom` is the amount of zoom regions you want the region coordinates from.
    - Default: `0`Output:
    - Coords (x,z): the given x and z coordinates
    - Chunk (x,z): The chunk x,z coordinates where the given position is in.
    - Regions (zoom/x,z): A list of all zoom regions in the range \[0,`zoom`\]

Web Map
-------

[](#web-map)

On the webpage of PocketMap (`http://:/`) you can view the real map. On the map you can do the following:

- View the location of all online players
- View all world maps (Currently only the overworld is tested)
    - You can select the world you want to view using buttons on the page
- View all created markers at each world
- View coordinates you are currently hovering on
    - When you click on the map, the coordinate will be added in the URL which can be used to share the location with others.
- Zoom in and out of the map.
    - This is managed by different zoom levels for the world, the zoom levels are in the interval \[0,8\], default zoom level is 4. You can change some of these items in the `config.yml` or `web/config.json`

Textures
--------

[](#textures)

PocketMap makes use of the vanilla resource pack provided by [bedrock-samples](https://github.com/Mojang/bedrock-samples). To make PocketMap more consistent with your server, all resource packs you use in your server are also used in PocketMap.

- Encrypted packs are not yet implemented

Rendering
---------

[](#rendering)

To show the map on the webpage, the minecraft world has to be rendered as images first. This is a complex process, and I'm constantly improving the rendering algorithm to make it faster and more efficient.

### From chunk to image

[](#from-chunk-to-image)

When a chunk is being rendered, we loop through all x,z positions in the chunk and get the highest block at each of the positions.
For each block we get the block type name and the block state. With these values, the correct texture is inside the `resource_packs/terrain_textures.json` is found and used as the texture in the map.
Not all blocks are the same, and PocketMap tries to make all blocks appear like in the minecraft world, such as

- Apply the right color from the color map for grass and foliage (leaves, etc)
- Apply biome colors for water
- Apply models for blocks like fences, buttons, etc. such that they have the right position and size on the map.
- Apply height difference for blocks
    - For now, blocks with `y%2 = 1`, will appear a bit darker than blocks with `y%2 = 0`
- Apply water transparency for blocks that are underwater using the correct values per biome
- Opaque blocks are visible through transparent blocks

Markers
-------

[](#markers)

There are different types of markers you can use in PocketMap. You can add three different types of markers using commands, but it is also possible to add markers by hand. The markers that are visible on the web map are all defined in the file `markers/markers.json`. It is also possible to add markers by hand.

### Marker types

[](#marker-types)

- `icon`: An icon displayed at a given position
- `circle`: A circle with its center at the given position and a given radius in blocks
- `polygon`: An area with the given corners, at least 3 corners need to be provided.
- `polyline`: A line with multiple points, lines will be drawn between one point and the next.

### Command Markers

[](#command-markers)

You can add some markers using commands. Please go to the [marker command documentation](#marker-command) for more details.

### Plugin Markers

[](#plugin-markers)

It is possible for plugins to make use of PocketMaps built-in marker system.

1. Add PocketMap to the `softdepend` list in your `plugin.yml`. (Don't use the `depend` list, as this requires all users to use PocketMap otherwise they can't use your plugin).

```
softdepend: [
  ..., # Other plugins
  PocketMap
]
```

2. Include `use Hebbinkpro\PocketMap\PocketMap;` where you want to use the add markers.
3. Add your markers

```
if (class_exists(PocketMap::class)) {
    $markers = PocketMap::getMarkers();
}
```

- If you don't include PocketMap in the (soft)depend list, you cannot make use of the `MarkerManager` in the plugin's `onEnable` function.
- You cannot use the `MarkerManager` in the plugin's `onLoad` function.

#### Available functions

[](#available-functions)

```
$markers->getIcons(): array
$markers->getMarker(string $id, World $world): ?array
$markers->removeMarker(string $id, World $world): bool

$markers->addIconMarker(string $name, Position $pos, string $icon, ?string $id = null): bool
$markers->addCircleMarker(string $name, Position $pos, int $radius, ?string $id = null, string $color = "red", bool $fill = false, ?string $fillColor = null): bool
$markers->addPolygonMarker(string $name, array $positions, World $world, ?string $id = null, string $color = "red", bool $fill = false, ?string $fillColor = null): bool
$markers->addPolylineMarker(string $name, array $positions, World $world, ?string $id = null, string $color = "red", bool $fill = false, ?string $fillColor = null): bool
```

### Stored Markers

[](#stored-markers)

1. Open the file `markers/markers.json`
2. Go to the world your marker has to be displayed in
3. Add the following to the world markers:

```
{
  "": {
    // replace  with the custom identifier for the marker
    "name": "string",
    // the name of the marker
    "data": {
      // ... the data fields of the marker
    }
  }
}
```

### Marker Type Data

[](#marker-type-data)

These are all marker data types that are implemented for the front-end using Leaflet's marker system.

#### Common data fields

[](#common-data-fields)

These are commonly used fields for the data types given below

##### Position

[](#position)

```
{
  "x": "int|float",
  // the x coordinate in the world
  "z": "int |float"
  // the z coordinate in the world
}
```

##### Options

[](#options)

```
{
  "color": "red",
  // the border color
  "fill": false,
  // if the marker is filled
  "fillColor": "red"
  // the color of the filled area
}
```

#### Icon

[](#icon)

```
{
  "type": "icon",
  // the data type
  "icon": string,
  // the name of the icon
  "pos": position
  // position of the marker
}
```

#### Circle

[](#circle)

```
{
  "type": "circle",
  // the data type
  "options": {
    // ... default options
    "radius": "int|float"
    // the radius (in blocks) of the circle
  },
  "pos": position
  // postion of the marker
}
```

#### Polygon

[](#polygon)

```
{
  "type": "polygon",
  // the data type
  "options": options,
  // options
  "positions": []
  // list of all corner positions
}
```

##### Polyline

[](#polyline)

```
{
  "type": "polyline",
  // the data type
  "options": options,
  // options
  "positions": []
  // list of all positions of the line
}
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance78

Regular maintenance activity

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~114 days

Total

32

Last Release

110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/807a733c32e94891bf019955905a463157f90a63be4d8c26def7da8904667760?d=identicon)[Hebbinkpro](/maintainers/Hebbinkpro)

---

Top Contributors

[![Hebbinkpro](https://avatars.githubusercontent.com/u/51849598?v=4)](https://github.com/Hebbinkpro "Hebbinkpro (217 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (1 commits)")

---

Tags

dynmapminecraftpmmppocketmappocketmine-mp

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hebbinkpro-pocketmap/health.svg)

```
[![Health](https://phpackages.com/badges/hebbinkpro-pocketmap/health.svg)](https://phpackages.com/packages/hebbinkpro-pocketmap)
```

###  Alternatives

[ergebnis/phpstan-rules

Provides rules for phpstan/phpstan.

4428.9M187](/packages/ergebnis-phpstan-rules)[symfony/ldap

Provides a LDAP client for PHP on top of PHP's ldap extension

1407.5M46](/packages/symfony-ldap)[sylius/registry

Services registry.

6211.0M40](/packages/sylius-registry)[typo3/cms-scheduler

TYPO3 CMS Scheduler - Schedule tasks to run once or periodically at a specific time.

168.8M157](/packages/typo3-cms-scheduler)[laramall/laravel-system-info

查看服务器所有信息 system info

311.0k1](/packages/laramall-laravel-system-info)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
