Added mute support, fixed chat msg removal, added a bit more support for mentions, fixes etc. #28

Merged
NorbiPeti merged 6 commits from dev into master 2017-05-15 00:43:08 +00:00
Showing only changes of commit bb416ee075 - Show all commits

View file

@ -23,13 +23,13 @@ public class CommandListener {
private static final ArrayList<Short> usableServerReadyStrings = new ArrayList<Short>(serverReadyStrings.length) {
private static final long serialVersionUID = 2213771460909848770L;
{
createUsableServerReadyStrings();
createUsableServerReadyStrings(this);
}
};
private static void createUsableServerReadyStrings() {
private static void createUsableServerReadyStrings(ArrayList<Short> list) {
for (short i = 0; i < serverReadyStrings.length; i++)
usableServerReadyStrings.add(i);
list.add(i);
}
public static IListener<?>[] getListeners() {
@ -60,7 +60,7 @@ public class CommandListener {
* (next == j) next++; if (next >= serverReadyStrings.length) next = 0; } lastServerReadyStrings.add(next); }
*/
if (usableServerReadyStrings.size() == 0)
createUsableServerReadyStrings();
createUsableServerReadyStrings(usableServerReadyStrings);
next = usableServerReadyStrings.remove(serverReadyRandom.nextInt(usableServerReadyStrings.size()));
DiscordPlugin.sendMessageToChannel(event.getMessage().getChannel(), serverReadyStrings[next]);
}