misc cleanup

This commit is contained in:
Luck
2017-02-26 12:43:35 +00:00
Unverified
parent 35d1057673
commit df99ef4481
26 changed files with 170 additions and 135 deletions
@@ -65,11 +65,11 @@ public class BungeeMessagingService extends AbstractMessagingService implements
protected void sendMessage(String channel, String message) {
plugin.getSpongeScheduler().createTaskBuilder().interval(10, TimeUnit.SECONDS).execute(task -> {
Collection<Player> players = plugin.getGame().getServer().getOnlinePlayers();
if (players.isEmpty()) {
Player p = Iterables.getFirst(players, null);
if (p == null) {
return;
}
Player p = Iterables.getFirst(players, null);
this.channel.sendTo(p, buf -> buf.writeUTF(message));
task.cancel();