package cn.citycraft.JoinMessage.listen;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

import cn.citycraft.JoinMessage.JoinMessage;
import fr.xephi.authme.events.LoginEvent;

public class PlayerLogin implements Listener {

	JoinMessage plugin;

	String[] lines;

	Player p;

	public PlayerLogin(JoinMessage main) {
		plugin = main;

	}

	// Message:
	// - joinmessage.vip:
	// - '%name%'
	// - '%displayname%'
	// - joinmessage
	// - vip


	@EventHandler(priority = EventPriority.HIGHEST)
	public void onLogin(LoginEvent e) {
		Player p = e.getPlayer();
		plugin.sendJoinMessage(p);
	}

}
