Fixes #135 (superpickaxe)

This commit is contained in:
Jesse Boyd 2016-06-18 11:13:06 +10:00
parent d6da78251e
commit fa090ee6bf
2 changed files with 5 additions and 2 deletions

View File

@ -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) {

View File

@ -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;
}
}