Superpickaxe async
This commit is contained in:
parent
cc4f654941
commit
3c0a2bd67e
@ -366,7 +366,13 @@ public class PlatformManager {
|
|||||||
if (player.isHoldingPickAxe() && session.hasSuperPickAxe()) {
|
if (player.isHoldingPickAxe() && session.hasSuperPickAxe()) {
|
||||||
final BlockTool superPickaxe = session.getSuperPickaxe();
|
final BlockTool superPickaxe = session.getSuperPickaxe();
|
||||||
if (superPickaxe != null && superPickaxe.canUse(player)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user