diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java index 756865184..ae017e84a 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java @@ -107,15 +107,9 @@ public class McMMOPlayer { playerMetadata = new FixedMetadataValue(mcMMO.p, playerName); - //Fake the profile - - profile = new PlayerProfile(playerName, false); - pendingCallback = new Callback() { @Override public void done(String playerName, PlayerProfile p) { - profile = p; - party = PartyManager.getPlayerParty(playerName); ptpRecord = new PartyTeleportRecord(); @@ -166,6 +160,8 @@ public class McMMOPlayer { if (!profile.isLoaded()) { mcMMO.p.getLogger().log(Level.WARNING, "Unable to load the PlayerProfile for {0}. Will retry over the next several seconds.", playerName); new RetryProfileLoadingTask().runTaskTimerAsynchronously(mcMMO.p, 11L, 31L); + } else { + new ApplySuccessfulProfile(profile).runTask(mcMMO.p); } } }; diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index edf821f76..02025d839 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -265,8 +265,8 @@ public class BlockListener implements Listener { * * @param event The event to watch */ - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onBlockDamage(BlockDamageEvent event) { + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) + public void onBlockBreakLower(BlockDamageEvent event) { if (event instanceof FakeBlockDamageEvent) { return; }