Finish adding dimension exclusions
This commit is contained in:
parent
10bd89450c
commit
f3bce6751b
19 changed files with 124 additions and 28 deletions
|
@ -0,0 +1,39 @@
|
|||
package dev.zontreck.otemod.integrations;
|
||||
|
||||
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||
import dev.zontreck.otemod.OTEMod;
|
||||
import dev.zontreck.otemod.chat.ChatServerOverride;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
|
||||
public class LuckPermsHelper {
|
||||
/*public static LuckPerms getLuckPerms()
|
||||
{
|
||||
return LuckPermsProvider.get();
|
||||
}
|
||||
|
||||
private static User getUserOf(Player p){
|
||||
return getLuckPerms().getPlayerAdapter(Player.class).getUser(p);
|
||||
}
|
||||
|
||||
private static boolean hasPermission(User u, String perm)
|
||||
{
|
||||
return u.getCachedData().getPermissionData().checkPermission(perm).asBoolean();
|
||||
}*/
|
||||
|
||||
public static boolean hasPermission(Player p, String perm)
|
||||
{
|
||||
//User u = getUserOf(p);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean hasGroupOrPerm(Player p, String group, String perm){
|
||||
return hasPermission(p, group) || hasPermission(p, perm);
|
||||
}
|
||||
|
||||
public static void sendNoPermissionsMessage(ServerPlayer play, String perm, String group) {
|
||||
ChatServerOverride.broadcastTo(play.getUUID(), Component.literal(OTEMod.OTEPrefix + ChatColor.doColors(" !Dark_Red!You do not have permission to use that command. You need permission !Gold!"+perm+" !White! or !Gold!"+group)), play.server);
|
||||
}
|
||||
}
|
Reference in a new issue