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.Main;
import fr.xephi.authme.events.LoginEvent;

public class PlayerLogin implements Listener {

	Main plugin;

	String[] lines;

	Player p;

	public PlayerLogin(Main 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);
	}

}
