Skip to content

Commit

Permalink
版本 v1.1.8
Browse files Browse the repository at this point in the history
1.更新依赖 mirai 从 2.8.3 更新到 2.10.0
2.更新依赖 kotlin 从 1.5.30 更新到 1.6.10
3.更新 github ci 自动编译版本标签
5.添加版权信息
4.优化文档
  • Loading branch information
limbang committed Mar 19, 2022
1 parent 5946d87 commit 7ab6968
Show file tree
Hide file tree
Showing 19 changed files with 177 additions and 57 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish-release-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish release version

on:
# 触发条件
push:
tags:
- 'v*.*.*'

jobs:
# 任务名称
build:
name: Publish mirai plugin
# 运行环境
runs-on: ubuntu-latest
# 步骤
steps:
- name: Check out Git repository
uses: actions/checkout@v2
# 设置JDK 版本
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
# 获取标签的版本设置到 output
- name: Set output
id: vars
run: echo ::set-output name=version::$(echo ${GITHUB_REF:11})
# 设置权限
- name: Setup gradlew permission
run: chmod +x gradlew
# 编译插件
- name: Build mirai plugin
run: ./gradlew buildPlugin
# 将文件上传到 GitHub release
- name: Upload jar to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/mirai/mirai-console-minecraft-plugin-${{ steps.vars.outputs.version }}.mirai.jar
tag: ${{ github.ref }}

61 changes: 11 additions & 50 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,58 +1,19 @@
# Mirai
# mirai
bots/
config/
data/
plugins/


# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

target/
build/

.idea/
*.iml
mirai.iml
/.idea/
.idea/*
/.idea/*

/test

.gradle/

local.properties

# Maven publishing credits
keys.properties
/plugins/
# Gradle
.gradle
**/build/
!src/**/build/

token.txt
bintray.user.txt
bintray.key.txt
# Idea
.idea/*.xml
*.iml
!.idea/copyright/

# For gpg sign
/build-gpg-sign
# Name for IDEA direction sorting
build-secret-keys/
# mac os
.DS_Store
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/copyright/mirai-console-mcmod-plugin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Mirai Console Minecraft Plugin

Mirai Console Minecraft Plugin
<div align="center">

[![](https://img.shields.io/github/v/release/limbang/mirai-console-minecraft-plugin?include_prereleases)](https://github.com/limbang/mirai-console-minecraft-plugin/releases)
![](https://img.shields.io/github/downloads/limbang/mirai-console-minecraft-plugin/total)
[![](https://img.shields.io/github/license/limbang/mirai-console-minecraft-plugin)](https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE)
[![](https://img.shields.io/badge/mirai-2.10.0-69c1b9)](https://github.com/mamoe/mirai)

本项目是基于 Mirai Console 编写的插件
<p>用于 ping 服务器状态,和查看服务器 tps,基于<a href = "https://github.com/Forsaken-Land/doctor">doctor</a>库实现</p>
<p>戳一戳机器人头像可以获取帮助</p>
</div>

## 命令

Expand All @@ -14,6 +20,12 @@ Mirai Console Minecraft Plugin
/mc deleteServer <name> # 删除服务器
/mc loginInfo # 查看登陆信息
```
### 使用TPS功能
1. 使用指令添加登陆信息,比如添加遗落之地的皮肤站演示如下
```shell
/mc addLogin nano https://skin.blackyin.xyz/api/yggdrasil/authserver https://skin.blackyin.xyz/api/yggdrasil/sessionserver 账号 密码
```
2. 然后添加服务器的时候用,`addServerLogin`命令添加,loginName 就是刚才设置的 nano,就可以使用了

mc addLogin url参考 [yggdrasil](https://github.com/yushijinhun/authlib-injector/wiki/Yggdrasil-%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%8A%80%E6%9C%AF%E8%A7%84%E8%8C%83#%E4%BC%9A%E8%AF%9D%E9%83%A8%E5%88%86)

Expand All @@ -38,3 +50,18 @@ name 可设置如下

TPS 暂时只支持 Forge 端

----

## 功能展示

戳一戳功能:
![](img/Screenshot_20220319_195629.jpg)

tps 功能:
![](img/1704DCA5-EC7F-4EF9-BF80-10DAC604836D.png)

直 ping 地址功能:
![](img/ABCBBD85-E183-41FE-BA3A-9D88853F43B3.png)

ping 全部添加的服务器功能:
![](img/B12FD04B-B159-4D4A-BE62-EA39510D9106.png)
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
val kotlinVersion = "1.5.30"
val kotlinVersion = "1.6.10"
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion

id("net.mamoe.mirai-console") version "2.8.3"
id("net.mamoe.mirai-console") version "2.10.0"
}

group = "top.limbang"
version = "1.1.7"
version = "1.1.8"

repositories {
maven("https://maven.fanua.top:8015/repository/maven-public/")
Expand Down
Binary file added img/1704DCA5-EC7F-4EF9-BF80-10DAC604836D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/ABCBBD85-E183-41FE-BA3A-9D88853F43B3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/B12FD04B-B159-4D4A-BE62-EA39510D9106.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/Screenshot_20220319_195629.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft

import net.mamoe.mirai.console.command.CommandSender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft

import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft


Expand All @@ -20,7 +29,7 @@ import top.limbang.mirai.minecraft.service.ServerService.pingServer
object MiraiConsoleMinecraftPlugin : KotlinPlugin(
JvmPluginDescription(
id = "top.limbang.mirai-console-minecraft-plugin",
version = "1.1.7",
version = "1.1.8",
) {
author("limbang")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft.extension

import java.io.ByteArrayInputStream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft.extension


Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft.service

import top.limbang.mirai.minecraft.MiraiConsoleMinecraftPlugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2020-2022 limbang and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
*/

package top.limbang.mirai.minecraft.service

import kotlinx.coroutines.GlobalScope
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
#
# Copyright 2020-2022 limbang and contributors.
#
# 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
# Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
#
# https://github.com/limbang/mirai-console-minecraft-plugin/blob/master/LICENSE
#

top.limbang.mirai.minecraft.MiraiConsoleMinecraftPlugin

0 comments on commit 7ab6968

Please sign in to comment.