Advertisement
Guest User

Untitled

a guest
Sep 29th, 2023
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.84 KB | None | 0 0
  1.     @EventHandler
  2.     public void onPostLoginEvent(LoginEvent e) {
  3.         getLogger().info("LoginEvent start, player connected: " + e.getConnection().isConnected());
  4.  
  5.         e.registerIntent(this);
  6.  
  7.         new Thread(()->{
  8.  
  9.             try {
  10.                 Thread.sleep(5000);
  11.             } catch (InterruptedException ex) {
  12.                 throw new RuntimeException(ex);
  13.             }
  14.  
  15.             e.completeIntent(this);
  16.  
  17.             getLogger().info("LoginEvent end, player connected: " + e.getConnection().isConnected());
  18.  
  19.         }).start();
  20.     }
  21.  
  22.     @EventHandler
  23.     public void onPlayerDisconnect(PlayerDisconnectEvent e) {
  24.         getLogger().info("PlayerDisconnectEvent called");
  25.     }
  26.  
  27.     @EventHandler
  28.     public void onPostLoginEvent(PostLoginEvent e) {
  29.         getLogger().info("PostLoginEvent called");
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement