Battery Management 图标

Battery Management

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0-RELEASE
本资源为搬运资源,原资源地址: https://modrinth.com/mod/battery-management
资源信息

Minecraft 版本: 1.20.1

平台: paper

标签: management technology utility

资源介绍

About

Minecraft Paper Plugin to save energy after inactivity and inform about low / high battery charge. This is thought for
small local servers that are running on old laptops or other devices with a battery. It (currently) has no permission set on it's command(s), which means everyone
is able to see the battery status.

Suggestions

If you have any suggestions, found a bug or have a feature request, please feel free to contact me!


The plugin is currently also only available for 1.20.1 on paper, but write me a DM and I can make it available for your desired version.


My discord username is eneas._.

Commands

  • /battery [ | ]

Requests and returns the current battery percentage, status, or both if no argument is specified. ## Usage The plugin can be configured to check the battery every given amount of minutes, and broadcast a warning in the chat if the battery is below a specified threshold and discharging or above another specified threshold and charging (default low is 10% and high is 90%).
It also has a feature to stop the server after a given duration of inactivity. This works by testing if no players are online and that the last player left and the last console command was executed, before this duration. If enabled, it also creates a marker file at a given path, so that the server start-script can test if the file exist and trigger further actions, like completely shutting down the device. ## Configuration ### Default plugin config: ```yaml battery: enabled: true # Disable battery checks if set to false warning_thresholds: high: 90 # Warn if battery is above this percentage low: 10 # Warn if battery is below this percentage check_interval: "5m" # How often to check battery level inactivity: enabled: true # Disable auto-shutdown if set to false max_duration: "15m" # Max inactivity time before shutdown check_interval: "5m" # How often to check for inactivity shutdown_info: file: "/tmp/battery_management/shutdown.info" # File indicating a shutdown request ``` ### Example scripts to start server and shutdown if plugin stopped server: #### Linux ```bash #!/bin/bash java -Xms2G -Xmx2G -XX:+UseG1GC -jar /Path/to/paper-server.jar --nogui FILE="/tmp/battery_management/shutdown.info" if [ -f "$FILE" ]; then rm -f "$FILE" shutdown now fi ``` #### Windows ```batch @echo off setlocal java -Xms2G -Xmx2G -XX:+UseG1GC -jar C:\Path\to\paper-server.jar --nogui set "file=C:\Windows\Temp\battery_management\shutdown.info" IF EXIST "%file%" ( del "%file%" shutdown -s -t 0 ) endlocal ```

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
CriticalPVP-Totems

价格:0 墨喵币
下载量:0

查看详情
Deadfly ModPack

价格:0 墨喵币
下载量:0

查看详情
Golemancy Origins

价格:0 墨喵币
下载量:0

查看详情
Blue CPVP Pack 16x

价格:0 墨喵币
下载量:0

查看详情