Fixes (/u ncolor), not allowing two of the same town colors, not broadcasting announcements if nobody is online #93

Merged
NorbiPeti merged 10 commits from dev into master 2019-01-03 20:43:22 +00:00
2 changed files with 26 additions and 3 deletions
Showing only changes of commit 99a8c1b020 - Show all commits

View file

@ -263,10 +263,9 @@ public class ChatProcessing {
final String nick = PlayerListener.nicknames.inverse().get(p.getUniqueId());
if (nick != null) {
nicksb.append(nick);
if (index < size - 1) {
if (index < size - 1)
nicksb.append("|");
addNickFormatter = true;
}
addNickFormatter = true; //Add it even if there's only 1 player online (it was in the if)
}
index++;
}

View file

@ -0,0 +1,24 @@
package buttondevteam.chat.components;
import buttondevteam.lib.architecture.Component;
import buttondevteam.lib.architecture.ConfigData;
public class TownColorComponent extends Component {
public ConfigData<Byte> colorCount() { //TODO
return getData("colorCount", (byte) 1, cc -> (byte) cc, cc -> (int) cc);
}
public ConfigData<Boolean> useNationColors() { //TODO
return getData("useNationColors", true);
}
@Override
protected void enable() {
//TODO: Don't register all commands automatically (welp)
}
@Override
protected void disable() {
}
}