Compare commits
2
Commits
main
...
c7e041363c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7e041363c | ||
|
|
9b4aacf18e |
No files matched your search
@@ -11,7 +11,7 @@
|
||||
|
||||
## 环境要求
|
||||
|
||||
- Minecraft **1.21.8**
|
||||
- Minecraft **1.21.11**
|
||||
- Java **21+**
|
||||
- Fabric Loader **≥ 0.19.5**
|
||||
- Fabric API
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'net.fabricmc.fabric-loom-remap' version "${loom_version}"
|
||||
id 'fabric-loom' version "${loom_version}"
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ org.gradle.configuration-cache=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21.8
|
||||
yarn_mappings=1.21.8+build.1
|
||||
minecraft_version=1.21.11
|
||||
yarn_mappings=1.21.11+build.6
|
||||
loader_version=0.19.5
|
||||
loom_version=1.18-SNAPSHOT
|
||||
|
||||
@@ -15,4 +15,4 @@ version=1.0.0
|
||||
group=top.gtb520.java.mods.openfly
|
||||
|
||||
# Dependencies
|
||||
fabric_api_version=0.136.1+1.21.8
|
||||
fabric_api_version=0.141.6+1.21.11
|
||||
@@ -3,6 +3,7 @@ package top.gtb520.java.mods.openfly.Commands;
|
||||
import com.mojang.brigadier.Command;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents;
|
||||
import net.minecraft.command.DefaultPermissions;
|
||||
import net.minecraft.command.argument.EntityArgumentType;
|
||||
import net.minecraft.entity.damage.DamageTypes;
|
||||
import net.minecraft.server.command.CommandManager;
|
||||
@@ -42,7 +43,7 @@ public class fly {
|
||||
})
|
||||
// /fly <player> - 切换指定玩家的飞行状态(需要OP权限)
|
||||
.then(CommandManager.argument("player", EntityArgumentType.player())
|
||||
.requires(source -> source.hasPermissionLevel(2))
|
||||
.requires(source -> source.getPermissions().hasPermission(DefaultPermissions.GAMEMASTERS))
|
||||
.executes(context -> {
|
||||
ServerPlayerEntity targetPlayer = EntityArgumentType.getPlayer(context, "player");
|
||||
UUID playerId = targetPlayer.getUuid();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.5",
|
||||
"minecraft": "~1.21.8",
|
||||
"minecraft": "~1.21.11",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user