Class DexUtils

java.lang.Object
me.c7dev.dexterity.util.DexUtils

public class DexUtils extends Object
Defines commonly used static methods used globally in the plugin or API
  • Constructor Details

    • DexUtils

      public DexUtils()
  • Method Details

    • createItem

      public static org.bukkit.inventory.ItemStack createItem(org.bukkit.Material material, int amount, String name, String... lore)
    • round

      public static String round(double d, int decimals)
    • locationString

      public static String locationString(org.bukkit.Location loc, int decimals)
    • vectorString

      public static String vectorString(org.bukkit.util.Vector loc, int decimals)
    • quaternionString

      public static String quaternionString(org.joml.Quaternionf q, int decimals)
    • quaternionString

      public static String quaternionString(org.joml.Quaterniond q, int decimals)
    • blockLoc

      public static org.bukkit.Location blockLoc(org.bukkit.Location loc)
    • minValue

      public static double minValue(org.bukkit.util.Vector v)
    • attrAlias

      public static String attrAlias(String s)
    • valueAlias

      public static int valueAlias(String s)
    • getAttributes

      public static HashMap<String,Integer> getAttributes(String[] args)
    • getAttributesStrings

      public static HashMap<String,String> getAttributesStrings(String[] args)
    • getAttributesDoubles

      public static HashMap<String,Double> getAttributesDoubles(String[] args)
    • getFlags

      public static List<String> getFlags(String[] args)
    • getDefaultAttributes

      public static List<String> getDefaultAttributes(String[] args)
    • getDefaultAttributesWithFlags

      public static List<String> getDefaultAttributesWithFlags(String[] args)
    • faceToDirection

      public static double faceToDirection(org.bukkit.block.BlockFace face, org.bukkit.util.Vector scale)
    • faceToDirectionAbs

      public static double faceToDirectionAbs(org.bukkit.block.BlockFace face, org.bukkit.util.Vector scale)
    • parseInt

      public static int parseInt(String s)
    • vector

      public static org.joml.Vector3f vector(org.bukkit.util.Vector v)
    • vectord

      public static org.joml.Vector3d vectord(org.bukkit.util.Vector v)
    • vector

      public static org.bukkit.util.Vector vector(org.joml.Vector3f v)
    • vector

      public static org.bukkit.util.Vector vector(org.joml.Vector3d v)
    • hadimard

      public static org.bukkit.util.Vector hadimard(org.bukkit.util.Vector a, org.bukkit.util.Vector b)
    • linearCombination

      public static org.bukkit.util.Vector linearCombination(org.bukkit.util.Vector x1, org.bukkit.util.Vector y1, org.bukkit.util.Vector z1, org.bukkit.util.Vector u)
    • location

      public static org.bukkit.Location location(org.bukkit.World w, org.bukkit.util.Vector v)
    • location

      public static org.bukkit.Location location(org.bukkit.World w, com.sk89q.worldedit.math.BlockVector3 v)
    • cloneQ

      public static org.joml.Quaternionf cloneQ(org.joml.Quaternionf r)
    • cloneQ

      public static org.joml.Quaterniond cloneQ(org.joml.Quaterniond r)
    • getVolume

      public static double getVolume(org.bukkit.Location l1, org.bukkit.Location l2)
    • getBlockVolume

      public static double getBlockVolume(org.bukkit.Location l1, org.bukkit.Location l2)
    • maxPage

      public static int maxPage(int size, int pagelen)
    • paginate

      public static void paginate(org.bukkit.entity.Player p, String[] strs, int page, int pagelen)
    • deserializeLocation

      public static org.bukkit.Location deserializeLocation(org.bukkit.configuration.file.FileConfiguration config, String dir)
    • getBlockDimensions

      public static org.bukkit.util.Vector getBlockDimensions(org.bukkit.block.data.BlockData b)
    • materials

      public static List<String> materials(String start)
    • materials

      public static List<String> materials(String start, String prefix)
    • bytesToHex

      public static String bytesToHex(byte[] bytes)
    • hexStringToBytes

      public static byte[] hexStringToBytes(String s)
    • getParameter

      public static double getParameter(org.bukkit.util.Vector v, int axis)
    • setParameter

      public static void setParameter(org.bukkit.util.Vector v, int axis, double val)
    • getParameter

      public static double getParameter(org.bukkit.Location loc, int axis)
    • oneHot

      public static org.bukkit.util.Vector oneHot(int axis)
    • oneHot

      public static org.bukkit.util.Vector oneHot(int axis, double param)
    • numbersContain

      public static boolean numbersContain(List<Double> list, double x)
    • rotMatDeg

      public static org.joml.Matrix3d rotMatDeg(double xdeg, double ydeg, double zdeg)
    • rotMat

      public static org.joml.Matrix3d rotMat(double xrad, double yrad, double zrad)
    • isAllowedMaterial

      public static boolean isAllowedMaterial(org.bukkit.Material mat)
    • isOrthonormal

      public static boolean isOrthonormal(org.bukkit.util.Vector x, org.bukkit.util.Vector y)
    • isOrthonormal

      public static boolean isOrthonormal(org.bukkit.util.Vector x, org.bukkit.util.Vector y, org.bukkit.util.Vector z)
    • nearestPoint

      public static org.bukkit.util.Vector nearestPoint(org.bukkit.util.Vector a, org.bukkit.util.Vector b, org.bukkit.util.Vector x)