• 周年纪念勋章活动已圆满结束,如有已购买但仍未申请的用户,可以通过对应勋章的下载链接申请~
资源图标

其他 [原创,适用于非面板服]python写的自动重启!仅1kb!服务器关闭立即重启,无误判!可自定义服务器路径和重启时间! 0.1

版权类型
原创
版权链接
#
前置组件
前置一python:
1.官网安装
https://www.python.org/
2.已经下载好的蓝凑云连接
https://wwxh.lanzoum.com/iol8j16dl3sd
密码:cmij

前置二,psutil的python库
安装好python后,windows徽标键+R打开运行,输入cmd,打开终端,输入
pip install psutil
这个命令,等待安装完成
教程:(xxxx是源码保护)
源代码:
#需要安装python,编写时使用python3.11
#使用方法:改后缀为py后,右键,选择edit with idle后面唯一的一个选项,会打开源码窗口,点击run,run moudle
import psutil#需要打开cmd输入"pip install psutil"
import subprocess
import time

def xxxxxxxxxxxx:
for xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
if proc.info['name'] == 'bedrock_server_mod.exe':#可以把此处改为别的名字以适配别的核心
xxxxxxxxxxxxx
xxxxxxxxxxxxxx

def xxxxxxxxxxxxxxxxx:
subprocess.Popen(r'D:\server\bedrock_server_mod.exe')#可以把此处路径修改以适配别的开服路径

while xxxx:
if xxxxxxxxxxxxxxx:
xxxxxxxxxxxxxxxxxxxxxxx
time.sleep(1)#此处timesleep后的数字意思是多久重启一次
作者
ye1115660
价格
50金粒
下载
15
查看
822
首次发布
最后更新

评分

0.00 星 0 次评分
后退
顶部 底部