44import ad1tya2 .adiauth .Bungee .events .discord ;
55import ad1tya2 .adiauth .Bungee .utils .BossBar ;
66import ad1tya2 .adiauth .Bungee .utils .pluginMessaging ;
7+ import ad1tya2 .adiauth .Bungee .utils .tools ;
78import ad1tya2 .adiauth .PluginMessages ;
9+ import net .md_5 .bungee .api .chat .ClickEvent ;
10+ import net .md_5 .bungee .api .chat .ComponentBuilder ;
11+ import net .md_5 .bungee .api .chat .HoverEvent ;
12+ import net .md_5 .bungee .api .chat .TextComponent ;
813import net .md_5 .bungee .api .config .ServerInfo ;
914import net .md_5 .bungee .api .connection .ProxiedPlayer ;
1015import net .md_5 .bungee .api .connection .Server ;
@@ -24,6 +29,7 @@ public class UserProfile {
2429 public String discordId ;
2530 public boolean discordLoginPending = false ;
2631 public Integer twoFactorCode ;
32+ public Long lastLogin ;
2733 //Full joined is set when a person completely logs into the server for the first time
2834
2935 public long sessionEnd = 1L ;
@@ -125,4 +131,22 @@ public String getTwoFactorCode(){
125131 twoFactorCode = twoFactorCode == null ? (int )(Math .random ()*9000 )+1000 : twoFactorCode ;
126132 return String .valueOf (twoFactorCode );
127133 }
134+
135+ public TextComponent getDataFormatted (){
136+ String data = "&e________________________________________" +
137+ "\n \n &2 Username: &b" +username +
138+ "\n &2 DiscordID: &b" +(discordId == null ? "" : discordId )+
139+ "\n &2 UUID: &b" +uuid +
140+ "\n &2 PremiumUUID: &b" +(premiumUuid == null ? "" : premiumUuid .toString ());
141+ TextComponent component = new TextComponent ();
142+ component .setText (tools .getColoured (data ));
143+ TextComponent ipComponent = new TextComponent ();
144+ ipComponent .setText (tools .getColoured ("\n &2 Ip Address: &b" + lastIp ));
145+ ipComponent .setClickEvent (new ClickEvent (ClickEvent .Action .SUGGEST_COMMAND , lastIp ));
146+ ipComponent .setHoverEvent (new HoverEvent (HoverEvent .Action .SHOW_TEXT , new ComponentBuilder ("Click to copy!" ).create ()));
147+ component .addExtra (ipComponent );
148+ component .addExtra (tools .getColoured ("\n &e________________________________________" ));
149+ return component ;
150+ }
151+
128152}
0 commit comments