Made the alpha login message only send one (forgot to save the task manager stuff)

This commit is contained in:
NewGarbo 2015-11-13 20:57:33 +00:00
parent 8ba9a8f6c4
commit 010f30f064

View File

@ -8,6 +8,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.C;
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
@ -41,11 +42,17 @@ public class ClansAlphaManager extends MiniPlugin
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event)
public void onPlayerJoin(final PlayerJoinEvent event)
{
if (!_taskManager.hasCompletedTask(event.getPlayer(), "ClansAlphaJoinMessage"))
{
UtilPlayer.message(event.getPlayer(), FIRST_JOIN_MESSAGES);
_taskManager.completedTask(new Callback<Boolean>()
{
public void run(Boolean data)
{
UtilPlayer.message(event.getPlayer(), FIRST_JOIN_MESSAGES);
}
}, event.getPlayer(), "ClansAlphaJoinMessage");
}
}