Fixes #135 (superpickaxe)
This commit is contained in:
parent
d6da78251e
commit
fa090ee6bf
@ -206,7 +206,9 @@ public class LocalSession {
|
||||
MAX_HISTORY_SIZE = Integer.MAX_VALUE;
|
||||
}
|
||||
// Don't store anything if no changes were made
|
||||
if (editSession.size() == 0 || editSession.hasFastMode()) return;
|
||||
if (editSession.size() == 0 || editSession.hasFastMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Destroy any sessions after this undo point
|
||||
if (append) {
|
||||
|
@ -342,7 +342,7 @@ public class PlatformManager {
|
||||
|
||||
// At this time, only handle interaction from players
|
||||
if (actor instanceof Player) {
|
||||
final Player player = (Player) actor;
|
||||
final Player player = PlayerWrapper.wrap((Player) actor);
|
||||
final LocalSession session = worldEdit.getSessionManager().get(actor);
|
||||
|
||||
if (event.getType() == Interaction.HIT) {
|
||||
@ -374,6 +374,7 @@ public class PlatformManager {
|
||||
superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location);
|
||||
}
|
||||
});
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user