Skip to content

Commit

Permalink
修改一些内容 again
Browse files Browse the repository at this point in the history
  • Loading branch information
stevei5mc committed Apr 4, 2024
1 parent 1f9d95e commit b531259
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.java text eol=lf
*.yml text eol=crlf
*.txt text eol=crlf
56 changes: 27 additions & 29 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
name: pr-check
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 获取信息
id: get_info
run: echo "repository_name=${GITHUB_REPOSITORY/${{ github.repository_owner }}\//}" >> $GITHUB_OUTPUT
- name: 拉取代码
uses: actions/checkout@v3
- name: 安装java8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: 构建
run: |
mvn -B package --file pom.xml
mkdir staging && cp target/*.jar staging
- name: 收集构建文件
uses: actions/upload-artifact@v1
with:
name: ${{ steps.get_info.outputs.repository_name }}-Pr_check-Build-${{ github.run_number}}
path: staging
- name: 批准PR
uses: hmarr/auto-approve-action@v4.0.0
name: pr-check
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 获取信息
id: get_info
run: echo "repository_name=${GITHUB_REPOSITORY/${{ github.repository_owner }}\//}" >> $GITHUB_OUTPUT
- name: 拉取代码
uses: actions/checkout@v3
- name: 安装java8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: 构建
run: |
mvn -B package --file pom.xml
mkdir staging && cp target/*.jar staging
- name: 收集构建文件
uses: actions/upload-artifact@v1
with:
name: ${{ steps.get_info.outputs.repository_name }}-Pr_check-Build-${{ github.run_number}}
path: staging
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
![GitHub forks](https://img.shields.io/github/forks/stevei5mc/NewTipsVariables?style=plastic)
![GitHub issues](https://img.shields.io/github/issues/stevei5mc/NewTipsVariables?style=plastic&color=linkGreen)
![GitHub pull requests](https://img.shields.io/github/issues-pr/stevei5mc/NewTipsVariables?style=plastic)
> **该插件可以为Tips添加更多的变量内容,更多变量敬请期待**
- **该插件可以为Tips提供更多的变量内容**
- **目前该插件正处于`beta`测试阶段如果有问题请及时提交[issues](https://github.com/stevei5mc/NewTipsVariables/issues)**
- **如果你有开发能力可以为其提供[PR](https://github.com/stevei5mc/NewTipsVariables/pulls)来增加更多变量或修复问题**

## **使用方法**
> **1、将插件放进`plugins`文件夹**
> **2、需确保安装`Tips`插件后重启服务器**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public boolean execute(CommandSender sender, String s, String[] args) {
if (command.canUser(sender)) {
return command.execute(sender, s, args);
}else if (sender.isPlayer()) {
sender.sendMessage("你没有权限使用此命令!");
sender.sendMessage("§c你没有权限使用此命令!");
}else {
sender.sendMessage("请在游戏内使用此命令!");
sender.sendMessage("§c请在游戏内使用此命令!");
}
}else {
this.sendHelp(sender);
Expand All @@ -54,7 +54,7 @@ public boolean execute(CommandSender sender, String s, String[] args) {
}
return true;
}else {
sender.sendMessage("你没有权限使用此命令!");
sender.sendMessage("§c你没有权限使用此命令!");
}
return true;
}
Expand Down Expand Up @@ -84,4 +84,4 @@ protected void loadCommandBase() {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ public String getName(){
* */
public abstract CommandParameter[] getParameters();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public NewTipsVariablesCommand() {
super("NewTipsVariables", "NewTipsVariables管理命令");
this.setPermission("newtipsariables.admin");
this.addSubCommand(new ReloadCommand("reload"));

this.loadCommandBase();
}

@Override
public void sendHelp(CommandSender sender) {
sender.sendMessage("§b=== NewTipsVariables ===");
sender.sendMessage("§a/newtipsariables reload §e重载配置文件");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String[] getAliases() {
@Override
public boolean execute(CommandSender sender, String label, String[] args) {
this.main.reload();
sender.sendMessage("重载配置完成!");
sender.sendMessage("§a重载配置完成!");
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public static void loadSupportVariables(Player player) {
//加载相关插件的变量时的提示
String debugPerfix = "§7[§cDEBUG§7] ";
String loadPlugin;
String loadSuccessMsg = Main.getInstance().getLanguage().getString("debug_plugins_found");
String loadFailureMsg = Main.getInstance().getLanguage().getString("debug_plugins_not_found");
String loadSuccessMsg = "§a找到插件§e【§b{0}§e】§a相关变量已加载";
String loadFailureMsg = "§c无法找到插件§e【§b{0}§e】§c相关变量加载失败,请安装相关插件再试";
//需要加载的变量的插件
loadPlugin = "playerPoints";
if (Server.getInstance().getPluginManager().getPlugin(loadPlugin) != null) {
Expand Down
4 changes: 1 addition & 3 deletions src/main/resources/language.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Unknown_World: §c未知世界§6{0}§c,请检查是否在§6world_name.yml§c中填写!
Unknown_Device_OS: §c未知的系统
Unknown_Device_controls: §c未知的操作方式
Unknown_Device_UIProfile: §cUnknown ui
debug_plugins_found: §a找到插件§e【§b{0}§e】§a相关变量已加载
debug_plugins_not_found: §c无法找到插件§e【§b{0}§e】§c相关变量加载失败,请安装相关插件再试
Unknown_Device_UIProfile: §cUnknown ui

0 comments on commit b531259

Please sign in to comment.