Skip to content

Commit

Permalink
Merge pull request #28 from Blue-Millennium/bug-fix
Browse files Browse the repository at this point in the history
Fix some bugs
  • Loading branch information
Suisuroru authored Jan 24, 2025
2 parents 7b627b9 + a1c5a61 commit b5eed17
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/auto_build_jar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
if [[ "$COMMIT_MESSAGE" == "[skip]"* ]]; then
echo "SKIP_UPLOAD=true" >> $GITHUB_ENV
echo "SKIP_RELEASE=true" >> $GITHUB_ENV
else
echo "SKIP_UPLOAD=false" >> $GITHUB_ENV
echo "SKIP_RELEASE=false" >> $GITHUB_ENV
fi
- name: Update version in plugin.yml
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
path: ${{ env.FINAL_JAR_NAME }}.jar

- name: Create Pre-Release and Upload JAR file
if: env.SKIP_UPLOAD == 'false' && env.SKIP_BUILD == 'false'
if: env.SKIP_RELEASE == 'false' && env.SKIP_BUILD == 'false'
uses: ncipollo/[email protected]
with:
tag: ${{ env.VERSION }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
sender.sendMessage("您没有权限这么做");
return true;
}
switch (args[0]) {
case "@e" -> {
if (args[1].isEmpty()) {
Command.broadcastCommandMessage(sender, "§c拒绝执行清除全部实体,请指定具体实体类型");
return true;
} else if (args[1].contains("type=!")) {
Command.broadcastCommandMessage(sender, "§c拒绝执行清除多类型全部实体,请指定具体实体类型");
return true;
}
if (args[0].startsWith("@e")) {
if (args[0].equals("@e")) {
Command.broadcastCommandMessage(sender, "§c拒绝执行清除全部实体,请指定具体实体类型");
return true;
} else if (String.join(" ", args).matches(".*?\\btype\\s*=\\s*!.*")) {
Command.broadcastCommandMessage(sender, "§c拒绝执行清除多类型全部实体,请指定具体实体类型");
return true;
}
}
switch (args[0]) {
case "@a" -> {
Command.broadcastCommandMessage(sender, "§c拒绝执行清除全部玩家,请选择其他具体实体类型");
return true;
Expand All @@ -38,6 +38,5 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
return Bukkit.dispatchCommand(sender, "minecraft:kill " + String.join(" ", args));
}
}
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Comman
completions.add("@a");
completions.add("@p");
completions.add("@r");
completions.add("items");
} else if (args.length == 2) {
if (args[0].matches("@[earp]")) {
completions.add("sort=");
Expand Down

0 comments on commit b5eed17

Please sign in to comment.