Made the alpha login message only send one (forgot to save the task manager stuff)
This commit is contained in:
parent
8ba9a8f6c4
commit
010f30f064
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user