
Player Restrictions System & Villager Tracker Module
The villager tracking module provides comprehensive monitoring and logging of villager death events:
Advanced restriction system allowing precise control over player actions:
/restrictionsMultiple storage backends for maximum flexibility:
Full internationalization support:
| Command | Description | Permission | Usage Example |
|---|---|---|---|
/npp reload |
Reloads plugin configuration and applies changes | newplayerpanel.admin |
/npp reload |
/npp addrestriction |
Creates a new restriction definition | newplayerpanel.admin |
/npp addrestriction elytra_ban EQUIPMENT EQUIP minecraft:elytra time:-1 default:false |
Command Syntax:
/npp addrestriction <name> <type> <actions> [targets...] [time:N] [default:true/false]
| Command | Description | Permission | Usage Example |
|---|---|---|---|
/history |
Displays all villager death records | newplayerpanel.history |
/history |
/history <player> |
Shows records for a specific player | newplayerpanel.history |
/history Steve |
/history <x> <y> <z> |
Shows records near coordinates | newplayerpanel.history |
/history 100 64 200 |
/history coords |
Shows records at your current location | newplayerpanel.history |
/history coords |
/history purge <time> |
Deletes records older than specified time | newplayerpanel.history.purge |
/history purge 7d |
Time Format Examples:
7d - 7 days30d - 30 days1h - 1 hour2w - 2 weeks1M - 1 month| Command | Description | Permission | Usage Example |
|---|---|---|---|
/restrict <player> <restriction> <time> |
Applies a restriction to a player | newplayerpanel.restrictions.restrict |
/restrict Steve elytra_ban 3600 |
/unrestrict <player> <restriction|all> |
Removes restriction(s) from a player | newplayerpanel.restrictions.restrict |
/unrestrict Steve elytra_ban |
/restrictions |
Displays your active restrictions | newplayerpanel.restrictions.view |
/restrictions |
/restrictions [player] |
Displays active restrictions of a player | newplayerpanel.restrictions.view.others |
/restrictions Steve |
Time Values:
-1 - Permanent restriction0 - Remove restriction>0 - Duration in seconds (e.g., 3600 = 1 hour)Note: Players can view their restrictions by using /restrictions without arguments. Administrators can view other players' restrictions by specifying the player name.
| Permission Node | Description | Default Access |
|---|---|---|
newplayerpanel.admin |
Full administrative access to /npp commands |
Operators only |
newplayerpanel.history |
View villager death history records | Operators only |
newplayerpanel.history.purge |
Permission to purge old history records | Operators only |
newplayerpanel.notify |
Receive notifications about villager deaths | Operators only |
newplayerpanel.restrictions.bypass |
Bypass all restrictions from configuration | Operators only |
newplayerpanel.restrictions.restrict |
Apply and remove player restrictions | Operators only |
newplayerpanel.restrictions.view |
View your active restrictions | All players |
newplayerpanel.restrictions.view.others |
View other players' restrictions | Operators only |
config.yml)language: en
storage: H2
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: ""
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
villager-tracker:
only-traded: true
notify-enabled: true
save-debug-files: false
restrictions.yml)restrictions:
- name: elytra_ban
type: EQUIPMENT
actions: EQUIP
item: [minecraft:elytra]
time: -1
default: false
- name: tnt_restriction
type: ITEM
actions: USE
item: [minecraft:tnt]
time: 28800
default: true
- name: villager_hit_restriction
type: ENTITY
actions: DAMAGE
entity: [minecraft:villager]
time: -1
default: false
| Type | Description | Target Field |
|---|---|---|
EQUIPMENT |
Restricts equipping items in armor/elytra slots | item |
ITEM |
Restricts using or placing items | item |
ENTITY |
Restricts interaction with entities | entity |
COMMAND |
Restricts command execution | command |
| Action | Description |
|---|---|
DAMAGE |
Dealing damage to entities |
USE |
Using or placing items |
DROP |
Dropping items |
EQUIP |
Equipping items in armor/elytra slots |
EXECUTE |
Executing commands |
Default Restrictions:
default: true, restrictions are automatically applied to all playerstime: 3600 (1 hour), restriction applies during the first hour after player's first jointime: -1, restriction is permanent for all playersPersonal Restrictions:
/restrict command/unrestrictPriority Order:
Viewing Restrictions:
/restrictions/restrictions <player>File-based storage using JSON format. All data is stored in plugins/NewPlayerPanel/data/:
messages.json - Localization messagesvillager_deaths.json - Villager death recordsrestrictions.json - Player restriction dataAdvantages:
Configuration:
storage: YAML
Embedded SQLite database stored as plugins/NewPlayerPanel/database.db.
Advantages:
Configuration:
storage: H2
Full integration with MySQL database with connection pooling via HikariCP.
Advantages:
Configuration:
storage: MYSQL
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: your_password
Native MariaDB support with optimized connection handling.
Advantages:
Configuration:
storage: MARIADB
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: your_password
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000