mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-25 18:37:41 +01:00
Add support for fabric-permissions-api
This commit is contained in:
parent
6186b16e8d
commit
68d5b9154d
@ -13,6 +13,7 @@ dependencies {
|
||||
mappings "net.fabricmc:yarn:1.16.3+build.1:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.9.3+build.207"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.20.2+build.402-1.16"
|
||||
modImplementation "me.lucko:fabric-permissions-api:0.1-SNAPSHOT"
|
||||
|
||||
shadowInclude (project(':BlueMapCommon')) {
|
||||
//exclude dependencies provided by fabric
|
||||
|
@ -33,6 +33,7 @@
|
||||
import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource;
|
||||
import de.bluecolored.bluemap.common.plugin.text.Text;
|
||||
import de.bluecolored.bluemap.core.world.World;
|
||||
import me.lucko.fabric.api.permissions.v0.Permissions;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@ -56,7 +57,7 @@ public void sendMessage(Text text) {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String permission) {
|
||||
return delegate.hasPermissionLevel(1);
|
||||
return Permissions.check(delegate, permission, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ dependencies {
|
||||
mappings "net.fabricmc:yarn:1.17+build.1:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.11.3"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.34.9+1.17"
|
||||
modImplementation "me.lucko:fabric-permissions-api:0.1-SNAPSHOT"
|
||||
|
||||
shadowInclude (project(':BlueMapCommon')) {
|
||||
//exclude dependencies provided by fabric
|
||||
|
@ -33,6 +33,7 @@
|
||||
import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource;
|
||||
import de.bluecolored.bluemap.common.plugin.text.Text;
|
||||
import de.bluecolored.bluemap.core.world.World;
|
||||
import me.lucko.fabric.api.permissions.v0.Permissions;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@ -56,7 +57,7 @@ public void sendMessage(Text text) {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String permission) {
|
||||
return delegate.hasPermissionLevel(1);
|
||||
return Permissions.check(delegate, permission, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ dependencies {
|
||||
mappings "net.fabricmc:yarn:1.18-pre5+build.4:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.11.3"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.42.2+1.18"
|
||||
modImplementation "me.lucko:fabric-permissions-api:0.1-SNAPSHOT"
|
||||
|
||||
shadowInclude (project(':BlueMapCommon')) {
|
||||
//exclude dependencies provided by fabric
|
||||
|
@ -33,6 +33,7 @@
|
||||
import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource;
|
||||
import de.bluecolored.bluemap.common.plugin.text.Text;
|
||||
import de.bluecolored.bluemap.core.world.World;
|
||||
import me.lucko.fabric.api.permissions.v0.Permissions;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@ -56,7 +57,7 @@ public void sendMessage(Text text) {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String permission) {
|
||||
return delegate.hasPermissionLevel(1);
|
||||
return Permissions.check(delegate, permission, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user