// Path: src/main/java/org/tyrannyofheaven/bukkit/util/ToHStringUtils.java
// public static boolean hasText(String text) {
//     return text != null && text.trim().length() > 0;
// }
// 
// Path: src/main/java/org/tyrannyofheaven/bukkit/util/ToHMessageUtils.java
// public static void sendMessage(CommandSender sender, String format, Object... args) {
//     String message = String.format(format, args);
//     for (String line : message.split("\n")) {
//         sender.sendMessage(line);
//     }
// }


import static org.tyrannyofheaven.bukkit.util.ToHStringUtils.hasText;
import static org.tyrannyofheaven.bukkit.util.ToHMessageUtils.sendMessage;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.permissions.Permissible;
     * @return true if conditions are met
     */
    public static boolean hasPermissions(Permissible permissible, boolean all, boolean checkNegations, String... permissions) {
        if (permissions == null || permissions.length == 0) return true;
        
        if (all) {
            for (String permission : permissions) {
                if (!hasText(permission))
                    throw new IllegalArgumentException("permission must have a value");

                if (!permissible.hasPermission(permission))
                    return false;
            }
            return true;
        }
        else {
            if (!checkNegations) {
                for (String permission : permissions) {
                    if (!hasText(permission))
                        throw new IllegalArgumentException("permission must have a value");

                    if (permissible.hasPermission(permission)) {
                        return true; // short-circuit true
                    }
                }
                return false;
            }
            else {
                boolean found = false;
                for (String permission : permissions) {
// Path: src/main/java/org/tyrannyofheaven/bukkit/util/ToHStringUtils.java
// public static boolean hasText(String text) {
//     return text != null && text.trim().length() > 0;
// }
// 
// Path: src/main/java/org/tyrannyofheaven/bukkit/util/ToHMessageUtils.java
// public static void sendMessage(CommandSender sender, String format, Object... args) {
//     String message = String.format(format, args);
//     for (String line : message.split("\n")) {
//         sender.sendMessage(line);
//     }
// }


// Path: src/main/java/org/tyrannyofheaven/bukkit/util/permissions/PermissionUtils.java
import static org.tyrannyofheaven.bukkit.util.ToHStringUtils.hasText;
import static org.tyrannyofheaven.bukkit.util.ToHMessageUtils.sendMessage;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.permissions.Permissible;

     * @return true if conditions are met
     */
    public static boolean hasPermissions(Permissible permissible, boolean all, boolean checkNegations, String... permissions) {
        if (permissions == null || permissions.length == 0) return true;
        
        if (all) {
            for (String permission : permissions) {
                if (!hasText(permission))
                    throw new IllegalArgumentException("permission must have a value");

                if (!permissible.hasPermission(permission))
                    return false;
            }
            return true;
        }
        else {
            if (!checkNegations) {
                for (String permission : permissions) {
                    if (!hasText(permission))
                        throw new IllegalArgumentException("permission must have a value");

                    if (permissible.hasPermission(permission)) {
                        return true; // short-circuit true
                    }
                }
                return false;
            }
            else {
                boolean found = false;
                for (String permission : permissions) {
                    if (!hasText(permission))