mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-01 17:36:46 +01:00
Replace DamageWithBreak
This commit is contained in:
parent
5d40347075
commit
da7b418acc
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user