Temporarily disable luckperms command integration on Paper

This commit is contained in:
2025-03-09 18:29:40 +02:00
parent fdbadd6696
commit 1a48fb6d33
13 changed files with 30 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ package com.hypherionmc.craterlib.api.commands;
import com.hypherionmc.craterlib.CraterConstants;
import com.hypherionmc.craterlib.compat.LuckPermsCompat;
import com.hypherionmc.craterlib.core.platform.LoaderType;
import com.hypherionmc.craterlib.core.platform.ModloaderEnvironment;
import com.hypherionmc.craterlib.nojang.authlib.BridgedGameProfile;
import com.hypherionmc.craterlib.nojang.commands.BridgedCommandSourceStack;
@@ -139,7 +140,7 @@ public class CraterCommand {
private boolean checkPermission(CommandSourceStack stack) {
try {
if (!ModloaderEnvironment.INSTANCE.isModLoaded("luckperms") || !stack.isPlayer() || luckPermNode.isEmpty())
if (!ModloaderEnvironment.INSTANCE.isModLoaded("luckperms") || ModloaderEnvironment.INSTANCE.getLoaderType() == LoaderType.PAPER || !stack.isPlayer() || luckPermNode.isEmpty())
return stack.hasPermission(this.permLevel);
return LuckPermsCompat.INSTANCE.hasPermission(stack.getPlayer(), this.luckPermNode) || stack.hasPermission(this.permLevel);