Superpickaxe async

This commit is contained in:
Jesse Boyd 2016-05-31 00:30:16 +10:00
parent cc4f654941
commit 3c0a2bd67e

View File

@ -366,7 +366,13 @@ public class PlatformManager {
if (player.isHoldingPickAxe() && session.hasSuperPickAxe()) {
final BlockTool superPickaxe = session.getSuperPickaxe();
if (superPickaxe != null && superPickaxe.canUse(player)) {
event.setCancelled(superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location));
FawePlayer<?> fp = FawePlayer.wrap(player);
fp.runAsyncIfFree(new Runnable() {
@Override
public void run() {
superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location);
}
});
return;
}
}