Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c5621b9b9 | ||
|
|
b91166b5d6 | ||
|
|
7f308bfa00 | ||
|
|
bfbdfd2199 |
No files matched your search
@@ -0,0 +1,30 @@
|
|||||||
|
# Automatically build the project and run any configured tests for every push
|
||||||
|
# and submitted pull request. This can help catch issues that only occur on
|
||||||
|
# certain platforms or Java versions, and provides a first line of defence
|
||||||
|
# against bad commits.
|
||||||
|
|
||||||
|
name: build
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: validate gradle wrapper
|
||||||
|
uses: gradle/actions/wrapper-validation@v6
|
||||||
|
- name: setup jdk
|
||||||
|
uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
java-version: '25'
|
||||||
|
distribution: 'microsoft'
|
||||||
|
- name: make gradle wrapper executable
|
||||||
|
run: chmod +x ./gradlew
|
||||||
|
- name: build
|
||||||
|
run: ./gradlew build
|
||||||
|
- name: capture build artifacts
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: Artifacts
|
||||||
|
path: build/libs/
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
- Minecraft **1.21.11**
|
- Minecraft **1.21.8**
|
||||||
- Java **21+**
|
- Java **21+**
|
||||||
- Fabric Loader **≥ 0.19.5**
|
- Fabric Loader **≥ 0.19.5**
|
||||||
- Fabric API
|
- Fabric API
|
||||||
|
|||||||
+4
-4
@@ -5,14 +5,14 @@ org.gradle.configuration-cache=true
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.11
|
minecraft_version=1.21.8
|
||||||
yarn_mappings=1.21.11+build.6
|
yarn_mappings=1.21.8+build.1
|
||||||
loader_version=0.19.5
|
loader_version=0.19.5
|
||||||
loom_version=1.18-SNAPSHOT
|
loom_version=1.18-SNAPSHOT
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
version=1.2.0-1.21.11
|
version=1.2.0-1.21.8
|
||||||
group=top.gtb520.java.mods.openfly
|
group=top.gtb520.java.mods.openfly
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_api_version=0.141.6+1.21.11
|
fabric_api_version=0.136.1+1.21.8
|
||||||
@@ -9,7 +9,6 @@ import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
|||||||
import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents;
|
import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents;
|
||||||
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
|
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.command.DefaultPermissions;
|
|
||||||
import net.minecraft.command.argument.EntityArgumentType;
|
import net.minecraft.command.argument.EntityArgumentType;
|
||||||
import net.minecraft.entity.damage.DamageTypes;
|
import net.minecraft.entity.damage.DamageTypes;
|
||||||
import net.minecraft.server.command.CommandManager;
|
import net.minecraft.server.command.CommandManager;
|
||||||
@@ -87,7 +86,7 @@ public class fly {
|
|||||||
})))
|
})))
|
||||||
// /fly player <player> - 切换指定玩家的飞行状态(需要OP权限)
|
// /fly player <player> - 切换指定玩家的飞行状态(需要OP权限)
|
||||||
.then(CommandManager.literal("player")
|
.then(CommandManager.literal("player")
|
||||||
.requires(source -> source.getPermissions().hasPermission(DefaultPermissions.GAMEMASTERS))
|
.requires(source -> source.hasPermissionLevel(2))
|
||||||
.then(CommandManager.argument("player", EntityArgumentType.player())
|
.then(CommandManager.argument("player", EntityArgumentType.player())
|
||||||
.executes(context -> {
|
.executes(context -> {
|
||||||
ServerPlayerEntity targetPlayer = EntityArgumentType.getPlayer(context, "player");
|
ServerPlayerEntity targetPlayer = EntityArgumentType.getPlayer(context, "player");
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.19.5",
|
"fabricloader": ">=0.19.5",
|
||||||
"minecraft": "~1.21.11",
|
"minecraft": "~1.21.8",
|
||||||
"java": ">=21",
|
"java": ">=21",
|
||||||
"fabric-api": "*"
|
"fabric-api": "*"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user