Merge remote-tracking branch 'nikita2/feature/fabric-permissions' into feature/v2

This commit is contained in:
Lukas Rieger (Blue) 2022-01-15 14:09:00 +01:00
commit 729de9c20e
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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