定制 hazardteam/autoclearchunk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hazardteam/autoclearchunk

Composer 安装命令:

composer create-project hazardteam/autoclearchunk

包简介

A PocketMine-MP plugin that automatically clears chunks in specified worlds at regular intervals.

README 文档

README

A PocketMine-MP plugin that automatically clears chunks in specified worlds at regular intervals.

Features

  • Automated Chunk Management: Automatically clears unloaded chunks in configured worlds to optimize server performance.
  • Flexible Scheduling: Allows for a configurable interval to automatically clear chunks, adapting to your server's specific needs.
  • Graceful Unloading: Includes a configurable grace period, ensuring chunks without players remain loaded for a specified duration before being considered for unloading.
  • Manual Control: Provides commands to manually trigger chunk clearing for immediate action.
  • Customizable Player Feedback: Offers configurable messages for different events, enhancing the player experience with clear notifications.
  • World Exclusion: Supports a blacklist to exclude specific worlds from the automatic chunk clearing process.
  • Stay Up-to-Date: Features an auto-update notifier to inform you of the latest plugin releases.

Default Config

# AutoClearChunk Configuration

# Enable Auto-Schedule
# Determines whether the plugin automatically schedules the task to clear unloaded chunks at the specified interval.
# Set to 'true' to enable auto-scheduling, 'false' to disable.
enable-auto-schedule: true

# Clear Interval Duration
# Defines the time interval at which unloaded chunks are automatically cleared.
# The value should be specified in a duration format.
# Examples: 1h (1 hour), 30m (30 minutes), 15s (15 seconds)
clear-interval-duration: 5m30s

# Chunk Unload Grace Period Duration
# Specifies how long a chunk without players should wait before being considered for unloading.
# Set to "0s" to disable the grace period and unload instantly (reverts to old behavior).
# Examples: 30s, 5m, 1h
chunk-unload-grace-period-duration: "30s"

# Clear Chunk Message
# Message displayed when chunks are cleared using the /clearchunk command.
# Use %d as a placeholder for the number of cleared chunks and %s for the world name.
# Color codes are supported.
# Default: "&aSuccessfully cleared %d chunks in world %s"
clearchunk-message: "&aSuccessfully cleared %d chunks in world %s"

# Clear Chunk Broadcast Message
# Message broadcast to all players when chunks are cleared using the /clearchunk command.
# Use %d as a placeholder for the number of cleared chunks and %s for the world name.
# Color codes are supported.
# Default: "&e%d chunks have been cleared in world %s"
clearchunk-broadcast-message: "&e%d chunks have been cleared in world %s"

# Clear All Chunk Message
# Message displayed when chunks are cleared using the /clearallchunk command.
# Use %d as a placeholder for the number of cleared chunks.
# Color codes are supported.
# Default: "&aSuccessfully cleared %d chunks in all worlds"
clearallchunk-message: "&aSuccessfully cleared %d chunks in all worlds"

# Clear All Chunk Broadcast Message
# Message broadcast to all players when chunks are cleared using the /clearallchunk command.
# Use %d as a placeholder for the number of cleared chunks.
# Color codes are supported.
# Default: "&e%d chunks have been cleared in all worlds"
clearallchunk-broadcast-message: "&e%d chunks have been cleared in all worlds"

# Enable Broadcast Messages
# Set to 'true' to enable broadcasting messages to all players when chunks are cleared, 'false' to disable.
broadcast-message: true

# Blacklisted Worlds
# List of world names that will be excluded from the chunk clearing process.
# Add the exact names of any worlds you want to exclude.
# Default: []
blacklisted-worlds:
  - your_world
  - another_world

Configuration

The plugin configuration file (config.yml) allows you to customize various aspects of the AutoClearChunk plugin. Here are the configurable options:

  • enable-auto-schedule (boolean): Set this option to true if you want to enable the automatic chunk clearing schedule. If set to false, chunks will only be cleared manually using commands.
  • clear-interval-duration (string): Specify the duration interval at which chunks should be cleared automatically. The duration should be specified in the format of 1h30m for 1 hour and 30 minutes.
  • chunk-unload-grace-period-duration (string): Defines how long a chunk without players should wait before being considered for unloading. Set to "0s" to disable the grace period and unload instantly. Examples: 30s, 5m, 1h.
  • clearchunk-message (string): Customize the message sent to players when chunks are cleared using the /clearchunk command.
  • clearchunk-broadcast-message (string): Customize the message broadcasted to all players when chunks are cleared using the /clearchunk command.
  • clearallchunk-message (string): Customize the message sent to players when chunks are cleared using the /clearallchunk command.
  • clearallchunk-broadcast-message (string): Customize the message broadcasted to all players when chunks are cleared using the /clearallchunk command.
  • broadcast-message (boolean): Set this option to true if you want to enable the broadcasting message when Chunk Cleared
  • blacklisted-worlds (array): Specify a list of worlds to exclude from chunk clearing. Add world names as individual array items.

You can edit the config.yml file using a text editor to adjust the plugin's behavior, customize messages, and define the worlds where chunk clearing should be applied.

Commands

The AutoClearChunk plugin provides the following commands for chunk clearing:

  • /clearchunk: Clears all chunks in the current world. Players receive a notification message.
    • Permission: autoclearchunk.command.clearchunk
  • /clearallchunk: Clears all chunks in all configured worlds. Players receive a notification message.
    • Permission: autoclearchunk.command.clearallchunk

Permissions

To control access to the commands provided by the AutoClearChunk plugin, the following permissions are available:

  • autoclearchunk.command.clearchunk: Allows players to use the /clearchunk command.
  • autoclearchunk.command.clearallchunk: Allows players to use the /clearallchunk command.

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

Upcoming Features

  • Currently none planned. You can contribute or suggest for new features.

Additional Notes

  • If you find bugs or want to give suggestions, please visit here.
  • We accept all contributions! If you want to contribute, please make a pull request in here.
  • Icons made from icons8.com

hazardteam/autoclearchunk 适用场景与选型建议

hazardteam/autoclearchunk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 7, 最近一次更新时间为 2023 年 07 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 hazardteam/autoclearchunk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 hazardteam/autoclearchunk 我们能提供哪些服务?
定制开发 / 二次开发

基于 hazardteam/autoclearchunk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-17