// 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;
    public static void requireOnePermission(Permissible permissible, String... permissions) {
        requireOnePermission(permissible, false, permissions);
    }

    /**
     * Require one of multiple permissions.
     * 
     * @param permissible the permissible to check
     * @param checkNegations true if any explicitly false permission should mean
     *     the check fails
     * @param permissions the names of the permissions
     */
    public static void requireOnePermission(Permissible permissible, boolean checkNegations, String... permissions) {
        if (!hasOnePermission(permissible, checkNegations, permissions))
            throw new PermissionException(false, checkNegations, permissions);
    }

    /**
     * Display a helpful error message when a permission check fails.
     * 
     * @param sender the command sender
     * @param permissionException the associated PermissionException
     */
    public static void displayPermissionException(CommandSender sender, PermissionException permissionException) {
        if (sender == null)
            throw new IllegalArgumentException("sender cannot be null");
        if (permissionException == null)
            throw new IllegalArgumentException("permissionException cannot be null");

        if (permissionException.getPermissions().size() == 1) {
// 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;

    public static void requireOnePermission(Permissible permissible, String... permissions) {
        requireOnePermission(permissible, false, permissions);
    }

    /**
     * Require one of multiple permissions.
     * 
     * @param permissible the permissible to check
     * @param checkNegations true if any explicitly false permission should mean
     *     the check fails
     * @param permissions the names of the permissions
     */
    public static void requireOnePermission(Permissible permissible, boolean checkNegations, String... permissions) {
        if (!hasOnePermission(permissible, checkNegations, permissions))
            throw new PermissionException(false, checkNegations, permissions);
    }

    /**
     * Display a helpful error message when a permission check fails.
     * 
     * @param sender the command sender
     * @param permissionException the associated PermissionException
     */
    public static void displayPermissionException(CommandSender sender, PermissionException permissionException) {
        if (sender == null)
            throw new IllegalArgumentException("sender cannot be null");
        if (permissionException == null)
            throw new IllegalArgumentException("permissionException cannot be null");

        if (permissionException.getPermissions().size() == 1) {
            sendMessage(sender, ChatColor.RED + "You need the following permission to do this:");