Delay the first "please login/register" message on join

This commit is contained in:
Gabriele C 2016-05-19 23:18:16 +02:00
parent 95b65ae20a
commit 92287cb5dd

View File

@ -224,8 +224,8 @@ public class AsynchronousJoin implements Process {
: MessageKey.REGISTER_MESSAGE;
}
if (msgInterval > 0 && LimboCache.getInstance().getLimboPlayer(name) != null) {
BukkitTask msgTask = service.runTask(new MessageTask(service.getBukkitService(), plugin.getMessages(),
name, msg, msgInterval));
BukkitTask msgTask = service.runTaskLater((Runnable)new MessageTask(service.getBukkitService(), plugin.getMessages(),
name, msg, msgInterval), 20L);
LimboPlayer limboPlayer = LimboCache.getInstance().getLimboPlayer(name);
if (limboPlayer != null) {
limboPlayer.setMessageTask(msgTask);