28 lines
1.0 KiB
Java
28 lines
1.0 KiB
Java
package net.t2code.alias.Spigot.system;
|
|
|
|
import net.t2code.alias.Spigot.Cache;
|
|
import net.t2code.alias.Spigot.Main;
|
|
import net.t2code.alias.Spigot.cmdManagement.ExecuteAlias;
|
|
import net.t2code.alias.Spigot.confirm.gui.ConfirmGUI;
|
|
import net.t2code.alias.Util;
|
|
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.event.EventHandler;
|
|
import org.bukkit.event.Listener;
|
|
import org.bukkit.event.player.PlayerLoginEvent;
|
|
import org.bukkit.event.player.PlayerQuitEvent;
|
|
|
|
public class PluginEvents implements Listener {
|
|
@EventHandler
|
|
public void onJoinEvent(PlayerQuitEvent event) {
|
|
Player player = event.getPlayer();
|
|
Cache.aliasStorage.remove(player.getUniqueId());
|
|
Cache.openPlayers.remove(player.getUniqueId());
|
|
}
|
|
|
|
@EventHandler
|
|
public void onJoinEvent(PlayerLoginEvent event) {
|
|
T2CupdateAPI.join(Main.getPlugin(), Util.getPrefix(), "t2code.alias.updatemsg", event.getPlayer(), Util.getSpigotID(), Util.getDiscord());
|
|
}
|
|
}
|