Replace DamageWithBreak

This commit is contained in:
Harry5573OP 2014-05-24 00:30:41 +01:00
parent 5d40347075
commit da7b418acc
2 changed files with 4 additions and 8 deletions

View File

@ -107,15 +107,9 @@ public class McMMOPlayer {
playerMetadata = new FixedMetadataValue(mcMMO.p, playerName); playerMetadata = new FixedMetadataValue(mcMMO.p, playerName);
//Fake the profile
profile = new PlayerProfile(playerName, false);
pendingCallback = new Callback() { pendingCallback = new Callback() {
@Override @Override
public void done(String playerName, PlayerProfile p) { public void done(String playerName, PlayerProfile p) {
profile = p;
party = PartyManager.getPlayerParty(playerName); party = PartyManager.getPlayerParty(playerName);
ptpRecord = new PartyTeleportRecord(); ptpRecord = new PartyTeleportRecord();
@ -166,6 +160,8 @@ public class McMMOPlayer {
if (!profile.isLoaded()) { if (!profile.isLoaded()) {
mcMMO.p.getLogger().log(Level.WARNING, "Unable to load the PlayerProfile for {0}. Will retry over the next several seconds.", playerName); 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); new RetryProfileLoadingTask().runTaskTimerAsynchronously(mcMMO.p, 11L, 31L);
} else {
new ApplySuccessfulProfile(profile).runTask(mcMMO.p);
} }
} }
}; };

View File

@ -265,8 +265,8 @@ public class BlockListener implements Listener {
* *
* @param event The event to watch * @param event The event to watch
*/ */
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBlockDamage(BlockDamageEvent event) { public void onBlockBreakLower(BlockDamageEvent event) {
if (event instanceof FakeBlockDamageEvent) { if (event instanceof FakeBlockDamageEvent) {
return; return;
} }