Fix missing bungee repository (Fixes #5)

This commit is contained in:
games647 2017-11-30 09:36:27 +01:00
parent f473188f1d
commit 8e73eecd51
No known key found for this signature in database
GPG Key ID: BFC68C8708713A88
2 changed files with 8 additions and 2 deletions

View File

@ -97,6 +97,11 @@
<id>sponge-repo</id>
<url>https://repo.spongepowered.org/maven</url>
</repository>
<repository>
<id>bungeecord-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>

View File

@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.ImmutableSet;
import io.netty.util.internal.ThreadLocalRandom;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
@ -62,7 +64,6 @@ public class CommonFormatter {
}
public void initPluginColors(Iterable<String> plugins, Map<String, String> configColors, String def) {
Random random = new Random();
Color[] colors = Color.values();
//remove black, because it's often hard to read
colors = Arrays.copyOfRange(colors, 1, colors.length);
@ -72,7 +73,7 @@ public class CommonFormatter {
String styleCode = configColors.getOrDefault(plugin, def);
if ("random".equalsIgnoreCase(styleCode)) {
//ignore default
styleCode = colors[random.nextInt(colors.length - 1)].name();
styleCode = colors[ThreadLocalRandom.current().nextInt(colors.length - 1)].name();
}
colorBuilder.put(plugin, format(styleCode));