PHPackages                             aiptu/playerwarn - 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. [Database &amp; ORM](/categories/database)
4. /
5. aiptu/playerwarn

ActiveProject[Database &amp; ORM](/categories/database)

aiptu/playerwarn
================

A PocketMine-MP plugin that allows server administrators to issue warnings to players and keep track of their warning history.

1.2.0(10mo ago)321[3 PRs](https://github.com/AIPTU/PlayerWarn/pulls)MITPHPCI passing

Since Jul 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/AIPTU/PlayerWarn)[ Packagist](https://packagist.org/packages/aiptu/playerwarn)[ RSS](/packages/aiptu-playerwarn/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (8)Used By (0)

PlayerWarn
==========

[](#playerwarn)

[![PlayerWarn build state badge](https://camo.githubusercontent.com/dbfc7930604854d6fc1461be3ab448e75ed4678d216260283496a2343cc9ff65/68747470733a2f2f706f676769742e706d6d702e696f2f736869656c642e73746174652f506c617965725761726e)](https://poggit.pmmp.io/p/PlayerWarn)[![PlayerWarn download count badge](https://camo.githubusercontent.com/b13dbd0ee8de92f5bcfbe56b029fc852c0519be7133c34bb1094ae445d91d799/68747470733a2f2f706f676769742e706d6d702e696f2f736869656c642e646c2e746f74616c2f506c617965725761726e)](https://poggit.pmmp.io/p/PlayerWarn)

A PocketMine-MP plugin that allows server administrators to issue warnings to players and keep track of their warning history.

Features
--------

[](#features)

1. **Player Warning System**: Comprehensive system for issuing warnings to players who violate server rules or exhibit inappropriate behavior.
2. **Warning Limits**: Set configurable limits on the number of warnings a player can accumulate, triggering actions when limits are reached.
3. **Customizable Punishments**: Define various types of punishments (kick, ban, ban-ip, tempban, none) for players exceeding the warning limit.
4. **Delayed Punishments**: Schedule punishments to activate after a specified delay, allowing time for players to correct behavior.
5. **Warning Expiration**: Assign expiration dates to warnings using duration strings (e.g., `1d`, `2h30m`); players are notified when warnings expire.
6. **Discord Integration**: Integrate with Discord via webhooks to receive notifications for warning-related events and punishments.
7. **Player Notifications**: Players receive notifications upon joining, indicating their current warning count and new warnings since last login.
8. **Update Notifications**: Optionally notify administrators of plugin updates.
9. **Pending Punishments**: Queue pending punishments for offline players, ensuring they are applied upon login.
10. **Database Support**: Uses SQLite (default) or MySQL for warning storage with async operations.
11. **Multi-Language Support**: Fully customizable messages with support for multiple languages (default: English and Indonesian).

Default Config
--------------

[](#default-config)

```
# PlayerWarn Configuration

# Do not change this (Only for internal use)!
config-version: 3.0

# Enable or disable the auto update checker notifier.
update_notifier: true

# Language setting
# Available languages: "en" (English), "id" (Indonesian)
# You can add your own language by creating a new file in the "lang" folder.
language: en

# Warning settings
warning:
  # The `expiration_check_interval` option specifies the time in seconds after which a warning expires.
  # Set to a positive integer. Default value: 180 (3 minutes)
  expiration_check_interval: 180

  # The `limit` option specifies the maximum number of warnings a player can receive before punishment is applied.
  # Set to a positive integer. Default value: 3
  limit: 3

  # The `delay` option specifies the delay time in seconds before applying the punishment.
  # If the delay is greater than 0, a warning message will be sent to the player.
  # If the delay is 0 or negative, the punishment will be applied immediately without delay.
  # Default value: 5
  delay: 5

  # The `broadcast_to_everyone` option enables or disables broadcasting warning events to all players on the server.
  # Set to true to enable broadcasting, or false to disable it.
  # When enabled, all players will be notified when a warning is issued.
  # Default value: true
  broadcast_to_everyone: true

# Punishment settings
punishment:
  # The `type` option specifies the type of punishment to apply when a player reaches the warning limit.
  # Valid options are "kick", "ban", "ban-ip", "tempban", and "none".
  # - "kick": Kicks the player from the server when the warning limit is reached.
  # - "ban": Bans the player from the server when the warning limit is reached.
  # - "ban-ip": Bans the player's IP address from the server when the warning limit is reached.
  # - "tempban": Temporarily bans the player from the server when the warning limit is reached.
  # - "none": No punishment will be applied when the warning limit is reached.
  # Default value is "none".
  type: none

  # Duration for "tempban" punishment type (e.g., "1d", "12h", "1d12h30m").
  tempban_duration: "1d"

# Database settings
database:
  # The database type. "sqlite" and "mysql" are supported.
  type: sqlite

  # Edit these settings only if you choose "sqlite".
  sqlite:
    # The file name of the database in the plugin data folder.
    # You can also put an absolute path here.
    file: warnings.sqlite
  # Edit these settings only if you choose "mysql".
  mysql:
    host: 127.0.0.1
    # Avoid using the "root" user for security reasons.
    username: root
    password: ""
    schema: your_schema
  # The maximum number of simultaneous SQL queries
  # Recommended: 1 for sqlite, 2 for MySQL. You may want to further increase this value if your MySQL connection is very slow.
  worker-limit: 1

# Discord integration settings
discord:
  # Enable or disable the Discord integration.
  # Set to true to enable the integration, or false to disable it.
  enabled: false

  # The Discord webhook URL to send messages to.
  # Replace 'YOUR_WEBHOOK_URL' with the actual URL of your Discord webhook.
  # Example: "https://discord.com/api/webhooks/123456789012345678/abcdeFGHiJKLmNOpqRSTUvwxYZ1234567890"
  webhook_url: "YOUR_WEBHOOK_URL"
```

Discord Integration
-------------------

[](#discord-integration)

Use this awesome website to generate valid json with built-in preview: [Discohook](https://discohook.app/), also you can send webhooks to your server with it if you just want fancy embed in your channel without any automatization. For tags reference see [TAGS\_REFERENCE.md](resources/webhooks/TAGS_REFERENCE.md)

- Webhook on Discord

    1. Go to **Server settings** -&gt; **Webhooks** -&gt; **Create Webhook**
    2. Setup name, avatar and the channel, where it will be posted. Copy **Webhook URL**. **Do not share! Very dangerous!**
    3. Click **Save** and then the **Done** button
- Enable Discord Integration

    1. Open the **config.yml** file.
    2. Find the **discord** section and change **enabled** to **true**.
    3. Paste the webhook URL under **webhook\_url**.

Custom Messages &amp; Languages
-------------------------------

[](#custom-messages--languages)

PlayerWarn supports multiple languages and fully customizable messages. By default, English (`en`) and Indonesian (`id`) are included.

### Changing the Language

[](#changing-the-language)

1. Open `config.yml`.
2. Change the `language` setting to your desired language code (e.g., `language: id`).
3. Restart the server.

### Adding a New Language

[](#adding-a-new-language)

1. Navigate to the `plugin_data/PlayerWarn/lang/` directory.
2. Copy `en.yml` and rename it to your language code (e.g., `es.yml` for Spanish).
3. Open the new file and translate the messages.
4. Update `config.yml` to use your new language code (e.g., `language: es`).
5. Restart the server.

Commands
--------

[](#commands)

CommandDescriptionPermissionDefault`/warn   [duration]`Issue a warning to a player`playerwarn.command.warn`OP`/warns [player]`View warning history`playerwarn.command.warns`All`/clearwarns `Clear all warnings for a player`playerwarn.command.clearwarns`OP`/delwarn  `Delete a specific warning by ID`playerwarn.command.delwarn`OP`/editwarn    [duration]`Edit a specific warning by ID`playerwarn.command.editwarn`OP`/listwarns`View all players with warnings`playerwarn.command.listwarns`OP### Examples

[](#examples)

```
/warn Steve griefing              # Permanent warning
/warn Steve spamming 2h30m        # Warning expires in 2 hours 30 minutes
/editwarn Steve 1 reason hacking  # Edit warning 1's reason only
/editwarn Steve 1 duration 2h30m  # Edit warning 1's duration only
/delwarn Steve 1                  # Delete warning 1
```

Permissions
-----------

[](#permissions)

- `playerwarn.command.warn` - Use the /warn command (default: op)
- `playerwarn.command.warns` - Use the /warns command (default: true)
- `playerwarn.command.clearwarns` - Use the /clearwarns command (default: op)
- `playerwarn.command.delwarn` - Use the /delwarn command (default: op)
- `playerwarn.command.editwarn` - Use the /editwarn command (default: op)
- `playerwarn.command.listwarns` - Use the /listwarns command (default: op)
- `playerwarn.bypass` - Cannot be warned (default: op)

Grant these permissions to specific player groups or individuals using a permissions management plugin of your choice.

Migration from v1.2.0 to v1.3.0
-------------------------------

[](#migration-from-v120-to-v130)

Upgrading from JSON-based versions? The plugin automatically migrates your data on first run. The old file is renamed to `warnings.json.migrated`.

TODO Features
-------------

[](#todo-features)

- **WarnHistory**: provide advanced warning history, analytics, and reporting features.

Additional Notes
----------------

[](#additional-notes)

- If you find bugs or want to give suggestions, please visit the [issues page](https://github.com/AIPTU/PlayerWarn/issues).
- We accept all contributions! If you want to contribute, please make a pull request on the [pull requests page](https://github.com/AIPTU/PlayerWarn/pulls).
- Icons made from [www.flaticon.com](https://www.flaticon.com)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance73

Regular maintenance activity

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.8% 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 ~363 days

Total

3

Last Release

316d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa0f82ae31849fc12498a3f34c511bd347db0a2c7f5892b0cb2b5d754e0d3127?d=identicon)[AIPTU](/maintainers/AIPTU)

---

Top Contributors

[![AIPTU](https://avatars.githubusercontent.com/u/85402087?v=4)](https://github.com/AIPTU "AIPTU (92 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (75 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (1 commits)")

---

Tags

aiptuphp8pocketmine-mppocketmine-mp-pluginpocketmine-pluginssqlwarnings

### Embed Badge

![Health badge](/badges/aiptu-playerwarn/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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