Skip to content

Commit fffcc9a

Browse files
authored
Fixes
1 parent 27ec7ef commit fffcc9a

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ loom {
2828
dependencies {
2929
// Minecraft 26.1.2
3030
minecraft 'com.mojang:minecraft:26.1.2'
31-
mappings loom.officialMojangMappings()
32-
3331
// Fabric Loader
3432
modImplementation 'net.fabricmc:fabric-loader:0.18.4'
3533

src/main/java/com/example/customcmd/CustomCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.mojang.brigadier.arguments.IntegerArgumentType;
44
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
5+
import net.fabricmc.fabric.api.permission.v1.Permissions;
56
import net.minecraft.commands.CommandSourceStack;
67
import net.minecraft.commands.Commands;
78
import net.minecraft.commands.arguments.EntityArgument;
@@ -17,7 +18,7 @@ public static void register() {
1718
dispatcher.register(
1819
Commands.literal("mycommand")
1920
// Yalnızca op seviyesi 2+ kullanabilir (0 = herkes)
20-
.requires(source -> source.hasPermission(2))
21+
.requires(source -> source.permissions().hasPermission(Permissions.COMMANDS_MODERATOR))
2122

2223
.then(Commands.argument("oyuncu", EntityArgument.players())
2324
.then(Commands.argument("miktar", IntegerArgumentType.integer(1, 9999))

0 commit comments

Comments
 (0)