mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 17:23:42 +01:00 
			
		
		
		
	Use PlayerLoginEvent instead to alleviate ban concerns
Research indicates that there is still enough time from login to join for this to be a good idea.
This commit is contained in:
		| @@ -270,22 +270,12 @@ public class PlayerListener implements Listener { | ||||
|      * Start user data prefetch. | ||||
|      */ | ||||
|     @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) | ||||
|     public void onFirstLogin(AsyncPlayerPreLoginEvent event) { | ||||
|         UserManager.prefetchUserData(event.getName()); | ||||
|     public void onLoginStart(PlayerLoginEvent event) { | ||||
|         UserManager.prefetchUserData(event.getPlayer().getName()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Cancel user data prefetch if another plugin kicks them. | ||||
|      */ | ||||
|     @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = false) | ||||
|     public void onPreLoginComplete(AsyncPlayerPreLoginEvent event) { | ||||
|         if (event.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) { | ||||
|             UserManager.discardPrefetch(event.getName()); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Cancel user data prefetch if they're banned or a plugin kicks them. | ||||
|      * Cancel user data prefetch if a plugin kicks them. | ||||
|      */ | ||||
|     @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = false) | ||||
|     public void onLoginComplete(PlayerLoginEvent event) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 riking
					riking