Browse Source

Move adding users to UserManager from onLogin to onJoin

TfT_02 12 years ago
parent
commit
8fb92292bd
2 changed files with 8 additions and 21 deletions
  1. 1 0
      Changelog.txt
  2. 7 21
      src/main/java/com/gmail/nossr50/listeners/PlayerListener.java

+ 1 - 0
Changelog.txt

@@ -49,6 +49,7 @@ Version 1.4.06-dev
  = Fixed bug where Blast Mining would drop wrong items
  = Fixed bug with Blast Mining where the Ability refreshed message was being send too early
  = Fixed bug where the chance of a successful Gracefull Roll was twice as high as displayed
+ = Fixed bug where lucky perks where not working
  ! Changed Spout notification tiers to be stored in SpoutConfig instead of AdvancedConfig
  ! Changed Berserk to add items to inventory rather than denying pickup
  ! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)

+ 7 - 21
src/main/java/com/gmail/nossr50/listeners/PlayerListener.java

@@ -127,27 +127,6 @@ public class PlayerListener implements Listener {
         }
     }
 
-    /**
-     * Monitor PlayerLogin events.
-     *
-     * @param event The event to watch
-     */
-    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
-    public void onPlayerLogin(PlayerLoginEvent event) {
-        if (event.getResult() != Result.ALLOWED) {
-            return;
-        }
-
-        Player player = event.getPlayer();
-
-        if (Misc.isNPCEntity(player)) {
-            return;
-        }
-
-        UserManager.addUser(player).actualizeRespawnATS();
-        ScoreboardManager.enablePowerLevelDisplay(player);
-    }
-
     /**
      * Handle PlayerDropItem events that involve modifying the event.
      *
@@ -285,6 +264,13 @@ public class PlayerListener implements Listener {
     public void onPlayerJoin(PlayerJoinEvent event) {
         Player player = event.getPlayer();
 
+        if (Misc.isNPCEntity(player)) {
+            return;
+        }
+
+        UserManager.addUser(player).actualizeRespawnATS();
+        ScoreboardManager.enablePowerLevelDisplay(player);
+
         if (Config.getInstance().getMOTDEnabled() && Permissions.motd(player)) {
             Motd.displayAll(player);
         }