Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ version = project.mod_version
group = project.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven {
url = "https://oss.sonatype.org/content/repositories/snapshots"
}
}

dependencies {
Expand All @@ -29,6 +27,7 @@ dependencies {

// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
modImplementation include('me.lucko:fabric-permissions-api:0.1-SNAPSHOT')
}

processResources {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/eu/vanish/commands/VanishCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import eu.vanish.data.FakeTranslatableText;
import eu.vanish.data.Settings;
import eu.vanish.data.VanishedPlayer;
import me.lucko.fabric.api.permissions.v0.Permissions;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.MessageType;
Expand Down Expand Up @@ -36,7 +37,7 @@ public final class VanishCommand {

public static void register(CommandDispatcher<ServerCommandSource> dispatcher) {
LiteralCommandNode<ServerCommandSource> commandNode = dispatcher.register(literal("vanish")
.requires(source -> source.hasPermissionLevel(4))
.requires(Permissions.require("vanish.command", 4))
.executes(context -> vanish(context.getSource().getPlayer())));
// dispatcher.register(literal("v").redirect(commandNode));
}
Expand Down