PHPackages                             nhanaz/blockdata\_example\_plugin - 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. nhanaz/blockdata\_example\_plugin

AbandonedPocketmine-plugin

nhanaz/blockdata\_example\_plugin
=================================

Example plugin to showcase how BlockData read-writes work.

10PHPCI failing

Since Aug 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/NhanAZ-Plugins/BlockDataExample)[ Packagist](https://packagist.org/packages/nhanaz/blockdata_example_plugin)[ RSS](/packages/nhanaz-blockdata-example-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

BlockDataExample
----------------

[](#blockdataexample)

A simple PocketMine-MP plugin that **shows how to use the [BlockData virion](https://github.com/NhanAZ-Libraries/BlockData)** by attaching extra information to blocks.

This plugin is mainly a **demo/example**, not a full protection system.

---

### What the plugin does

[](#what-the-plugin-does)

- **Remembers who placed a block**
    - When a player places a block, the plugin stores:
        - The player name
        - The time the block was placed
- **Only the owner can break the block**
    - If another player tries to break it, the break is cancelled (unless they have a bypass permission).
- **Lets you inspect block info**
    - Players can toggle an "inspect mode" and right-click a block to see:
        - Who placed it
        - When it was placed

All of this data is stored using the **BlockData** library — see the main repo:
`https://github.com/NhanAZ-Libraries/BlockData`

---

### Requirements

[](#requirements)

- PocketMine-MP API `5.0.0` or newer
- The **BlockData** virion (library) loaded for this plugin
    ([GitHub: NhanAZ-Libraries/BlockData](https://github.com/NhanAZ-Libraries/BlockData))

---

### Installation

[](#installation)

1. Download or build the `BlockDataExample` plugin `.phar`.
2. Make sure the **BlockData** virion is correctly included in your server setup.
3. Put the `.phar` file into your server `plugins` folder.
4. Start (or restart) your PocketMine-MP server.

If everything is correct, you should see `BlockDataExample` enabled in the console.

---

### How to use

[](#how-to-use)

- **Place blocks**

    - Simply place any blocks as usual. Placement info will be saved automatically.
- **Inspect block data**

    - As a player, run:

        ```
        /inspect

        ```
    - You will see a message saying inspect mode is enabled.
    - Right-click a block:

        - If it has data, you will see the owner name and placed time.
        - If not, it will say the block has no data.
- **Break blocks**

    - The block can only be broken by its owner (or players with the bypass permission).

---

### Permissions

[](#permissions)

- `blockdata.bypass`
    Allows a player to break blocks regardless of who placed them.

You can give this permission to admins or trusted staff if you want them to ignore ownership checks.

---

### Notes

[](#notes)

- This plugin is intentionally small and simple so you can:
    - Read the code easily (see `src/BlockDataExample/Main.php`).
    - Learn how to integrate and use the **BlockData** virion in your own plugins.
    - Compare with the official **BlockData** documentation here: `https://github.com/NhanAZ-Libraries/BlockData`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance55

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/737e9f0e23b56164d8e08729d58be66b69dc994c6b2bfa3c71b4efe4b231d785?d=identicon)[NhanAZ](/maintainers/NhanAZ)

---

Top Contributors

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

---

Tags

blockdataexamplephppluginpmmppocketmine-mp

### Embed Badge

![Health badge](/badges/nhanaz-blockdata-example-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/nhanaz-blockdata-example-plugin/health.svg)](https://phpackages.com/packages/nhanaz-blockdata-example-plugin)
```

PHPackages © 2026

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