让你的 Minecraft 服务器运行更流畅!?
本模组会自动清理你 Minecraft 服务器中的实体以防止卡顿。它会按照你配置的固定间隔执行此操作。你还可以通过命令启用/禁用自动清理并重置计时器。
⚙️ 工作原理?
“Custom Clear Lag”模组在服务器后台运行。以下是关键步骤:
- ? 配置: 当首次安装该模组启动服务器时,会在
config/oas_work/ 文件夹中创建一个名为 clear_lag.json 的配置文件。
- ? 读取配置文件: 模组会读取这个
clear_lag.json 文件以获取以下信息:
- ⏱️
time: 距离下次清理应经过多少分钟(默认为 5 分钟)。
- ?
command: 应执行哪个命令来进行清理(默认为 kill @e,即杀死所有实体,请小心使用!)。
- ⏳ 倒计时: 模组会统计游戏中流逝的时间。
- ? 自动清理: 一旦达到配置的时间,模组将执行配置文件中定义的命令。清理完成后,时间计数器重置并重新开始。
? 如何使用?
-
?️ 配置(可选但强烈推荐**):**
- ? 定位配置文件: 前往服务器的
config/oas_work/ 文件夹,并使用文本编辑器打开 clear_lag.json 文件。
- ✏️ 修改设置:
"time": 5, 将 5 更改为每次清理之间期望的分钟数(例如,10 代表 10 分钟)。
"command": "kill @e" ⚠️ 非常重要: 默认命令 kill @e 会杀死 所有 实体(地上的物品、动物、玩家……)。你必须将其更改为更具针对性的清理命令。 例如:
"/kill @e[type=!minecraft:player,distance=500]" (杀死除玩家以外的所有实体,且距离超过 500 格——请根据你的服务器进行调整)。
/minecraft:kill @e[type=!player,tag=!keep] (需要标签来保护某些实体,更高级)。
- ? 保存
clear_lag.json 文件。? 更改立即生效,无需重启服务器!
-
?️ 游戏内命令(仅限服务器管理员):
打开服务器控制台或游戏内聊天(如果你是管理员),并使用命令:/cclearlag
? 重要提示:
- ? 托管兼容性: 本模组适用于所有类型的 Minecraft Forge/NeoForge 服务器。
- ? 权限: 只有服务器管理员(等级 4)才能使用
/cclearlag 命令。
- ⚠️ 必要配置: 务必更改
clear_lag.json 中的默认 kill @e 命令! 请使用更适合你服务器的命令,以避免删除重要实体(如玩家、驯服动物等)。
- ? 即时生效: 对
clear_lag.json 文件的修改会立即应用,无需重启服务器。
? 我们正在招募法语使用者! 想为更多出色的 Minecraft 模组和项目做出贡献吗?我们需要会说法语的人加入我们的团队。如需更多信息,请通过电子邮件联系:persodreykaoas@gmail.com
Keep Your Minecraft Server Smooth! ?
This mod automatically cleans up entities on your Minecraft server to prevent lag. It does this at regular intervals that you can configure. You can also enable/disable and reset the timer with a command.
⚙️ How does it work?
The "Custom Clear Lag" mod works in the background on your server. Here are the key steps:
- ? Configuration: When the server starts for the first time with the mod installed, a configuration file named
clear_lag.json is created in the config/oas_work/ folder.
- ? Reading the configuration file: The mod reads this
clear_lag.json file to find out:
- ⏱️
time: After how many minutes the cleanup should be performed (default is 5 minutes).
- ?
command: Which command should be executed for the cleanup (default is kill @e which kills all entities, be careful!).
- ⏳ Countdown: The mod counts the time elapsed in the game.
- ? Automatic Cleanup: Once the configured time has elapsed, the mod executes the command defined in the configuration file. After the cleanup, the time counter is reset and starts again.
? How to use it?
-
?️ Configuration (optional but recommended):
- ? Locate the configuration file: Go to the
config/oas_work/ folder of your server and open the clear_lag.json file with a text editor.
- ✏️ Modify the settings:
"time": 5, Change 5 to the desired number of minutes between each cleanup (e.g., 10 for 10 minutes).
"command": "kill @e" ⚠️ VERY IMPORTANT: The default command kill @e kills ALL entities (items on the ground, animals, players...). You MUST change it to a more targeted cleanup command. For example:
"/kill @e[type=!minecraft:player,distance=500]" (Kills all entities except players, more than 500 blocks away - adapt to your server).
/minecraft:kill @e[type=!player,tag=!keep] (Requires tags to protect certain entities, more advanced).
- ? Save the
clear_lag.json file. ? Changes are applied immediately, no server restart needed!
-
?️ In-game commands (for server operators):
Open the server console or the in-game chat (if you are an operator) and use the command: /cclearlag
? Important Points:
- ? Hosting Compatibility: This mod works on all types of Minecraft Forge/NeoForge servers.
- ? Permissions: Only server operators (level 4) can use the
/cclearlag command.
- ⚠️ Essential Configuration: Absolutely change the default
kill @e command in clear_lag.json! Use a more suitable command for your server to avoid deleting important entities (players, tamed animals, etc.).
- ? Instant Changes: Modifications to the
clear_lag.json file are applied immediately, without restarting the server.
? We're Recruiting French Speakers! Want to contribute to more awesome Minecraft mods and projects? We are looking for people who can speak French to join our team. For more information, please reach out via email: persodreykaoas@gmail.com
评论 0
登录后参与评分
还没有评论,来抢沙发吧