Class Rnd
java.lang.Object
studio.magemonkey.codex.util.random.Rnd
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanchance(double chance) static booleanchance(int chance) static floatget()static floatget(boolean normalize) static intget(int n) static intget(int[] list) static intget(int min, int max) static <E> Eget(E[] list) static <E> Estatic <T> Tstatic <T> List<T> static org.bukkit.MaterialgetColoredMaterial(org.bukkit.Material m) static doublegetDouble(double max) static doublegetDouble(double min, double max) static doublegetDoubleNega(double min, double max) static <T> TgetRandomItem(Map<T, Double> map) Deprecated.static <T> TgetRandomItem(Map<T, Double> map, boolean alwaysHundred) Deprecated.static booleanstatic doublestatic doublestatic intnextInt()static intnextInt(int n) static org.bukkit.entity.FireworkspawnRandomFirework(org.bukkit.Location loc)
-
Field Details
-
rnd
-
-
Constructor Details
-
Rnd
public Rnd()
-
-
Method Details
-
get
public static float get() -
get
public static float get(boolean normalize) -
get
public static int get(int n) -
get
public static int get(int min, int max) -
getDouble
public static double getDouble(double max) -
getDouble
public static double getDouble(double min, double max) -
getDoubleNega
public static double getDoubleNega(double min, double max) -
get
@NotNull public static <E> E get(@NotNull E[] list) -
get
public static int get(int[] list) -
get
-
get
-
get
-
getRandomItem
Deprecated. -
getRandomItem
@Deprecated @Nullable public static <T> T getRandomItem(@NotNull Map<T, Double> map, boolean alwaysHundred) Deprecated. -
chance
public static boolean chance(int chance) -
chance
public static boolean chance(double chance) -
nextInt
public static int nextInt(int n) -
nextInt
public static int nextInt() -
nextDouble
public static double nextDouble() -
nextGaussian
public static double nextGaussian() -
nextBoolean
public static boolean nextBoolean() -
spawnRandomFirework
@NotNull public static org.bukkit.entity.Firework spawnRandomFirework(@NotNull org.bukkit.Location loc) -
getColoredMaterial
@NotNull public static org.bukkit.Material getColoredMaterial(@NotNull org.bukkit.Material m)
-