Ignore black for random colors
This commit is contained in:
parent
5455c8d039
commit
b8c61ecaba
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>ColorConsole</name>
|
||||
<version>2.1</version>
|
||||
<version>2.2</version>
|
||||
<inceptionYear>2016</inceptionYear>
|
||||
<url>http://dev.bukkit.org/bukkit-plugins/colorconsole/</url>
|
||||
<description>
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.github.games647.colorconsole.common;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
@ -10,6 +11,7 @@ import java.util.Set;
|
|||
|
||||
import org.fusesource.jansi.Ansi;
|
||||
import org.fusesource.jansi.Ansi.Attribute;
|
||||
import org.fusesource.jansi.Ansi.Color;
|
||||
import org.fusesource.jansi.AnsiRenderer;
|
||||
|
||||
public class CommonFormatter {
|
||||
|
@ -42,7 +44,9 @@ public class CommonFormatter {
|
|||
|
||||
public void initPluginColors(Collection<String> plugins, Map<String, String> configColors, String def) {
|
||||
Random random = new Random();
|
||||
Ansi.Color[] colors = Ansi.Color.values();
|
||||
Color[] colors = Color.values();
|
||||
//remove black, because it's often hard to read
|
||||
colors = Arrays.copyOfRange(colors, 1, colors.length);
|
||||
|
||||
ImmutableMap.Builder<String, String> colorBuilder = ImmutableMap.builder();
|
||||
for (String plugin : plugins) {
|
||||
|
|
|
@ -33,6 +33,7 @@ TRACE: blue
|
|||
|
||||
# This can be the default color or "random" it gives each plugin (besides the ones specified below) a different color
|
||||
# which keeps the same until the server shuts down.
|
||||
# Black is ignored by default, because it's often hard to read on the console
|
||||
PLUGIN: blue
|
||||
# Plugin: random
|
||||
|
||||
|
|
Loading…
Reference in New Issue