// Path: src/com/hpspells/core/util/SVPBypass.java
// public static Method getMethod(Class<?> cl, String method) {
//     for (Method m : cl.getMethods()) {
//         if (m.getName().equals(method)) {
//             return m;
//         }
//     }
//     return null;
// }


import org.bukkit.inventory.ItemStack;
import java.util.Map;
import java.util.Random;
import static com.hpspells.core.util.SVPBypass.getMethod;
package com.hpspells.core.util;




/**
 * A class containing a mix of effects
 */
public class MiscUtilities {
    private static Class<?> cbItemStack = SVPBypass.getCurrentCBClass("inventory.CraftItemStack"), nmsItemStack = SVPBypass.getCurrentNMSClass("ItemStack"), nmsTagCompound = SVPBypass.getCurrentNMSClass("NBTTagCompound"), nmsTagList = SVPBypass.getCurrentNMSClass("NBTTagList");

    /**
     * Makes an {@link ItemStack} glow as if enchanted <br>
     * Based on stirante's {@code addGlow} method in his <a href="https://github.com/SocialCraft/PrettyScaryLib/blob/master/src/com/stirante/PrettyScaryLib/EnchantGlow.java">EnchantGlow</a> class
     *
     * @param item the item stack to make glow
     * @return the glowing item stack
     * @throws Exception if an error occurred whilst making the item glow
     */
    public static ItemStack makeGlow(ItemStack item) throws Exception {
// Path: src/com/hpspells/core/util/SVPBypass.java
// public static Method getMethod(Class<?> cl, String method) {
//     for (Method m : cl.getMethods()) {
//         if (m.getName().equals(method)) {
//             return m;
//         }
//     }
//     return null;
// }


// Path: src/com/hpspells/core/util/MiscUtilities.java
import org.bukkit.inventory.ItemStack;
import java.util.Map;
import java.util.Random;
import static com.hpspells.core.util.SVPBypass.getMethod;

package com.hpspells.core.util;




/**
 * A class containing a mix of effects
 */
public class MiscUtilities {
    private static Class<?> cbItemStack = SVPBypass.getCurrentCBClass("inventory.CraftItemStack"), nmsItemStack = SVPBypass.getCurrentNMSClass("ItemStack"), nmsTagCompound = SVPBypass.getCurrentNMSClass("NBTTagCompound"), nmsTagList = SVPBypass.getCurrentNMSClass("NBTTagList");

    /**
     * Makes an {@link ItemStack} glow as if enchanted <br>
     * Based on stirante's {@code addGlow} method in his <a href="https://github.com/SocialCraft/PrettyScaryLib/blob/master/src/com/stirante/PrettyScaryLib/EnchantGlow.java">EnchantGlow</a> class
     *
     * @param item the item stack to make glow
     * @return the glowing item stack
     * @throws Exception if an error occurred whilst making the item glow
     */
    public static ItemStack makeGlow(ItemStack item) throws Exception {
        Object nmsStack = getMethod(cbItemStack, "asNMSCopy").invoke(cbItemStack, item);