mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-11-30 06:33:55 +01:00
Version 2.1.4.2 bump
This commit is contained in:
parent
8d47f52265
commit
e03e93b9b9
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<name>PlayerBalancer Plugin</name>
|
<name>PlayerBalancer Plugin</name>
|
||||||
<artifactId>playerbalancer-plugin</artifactId>
|
<artifactId>playerbalancer-plugin</artifactId>
|
||||||
<version>2.1.4.1</version>
|
<version>2.1.4.2</version>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>PlayerBalancer</finalName>
|
<finalName>PlayerBalancer</finalName>
|
||||||
|
@ -3,10 +3,12 @@ package com.jaimemartz.playerbalancer.utils;
|
|||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RandomUtils {
|
public final class RandomUtils {
|
||||||
private static final SecureRandom instance = new SecureRandom();
|
private static final SecureRandom instance = new SecureRandom();
|
||||||
|
|
||||||
public static <T> T random(List<T> list) {
|
public static <T> T random(List<T> list) {
|
||||||
return list.get(instance.nextInt(list.size()));
|
return list.get(instance.nextInt(list.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private RandomUtils() {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user