mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 09:17:39 +00:00
Fix repl
This commit is contained in:
parent
c220e30ecc
commit
8c30c72b73
@ -54,10 +54,14 @@ public class BlockReplacer implements DoubleActionBlockTool {
|
||||
public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session, com.sk89q.worldedit.util.Location clicked) {
|
||||
BlockBag bag = session.getBlockBag(player);
|
||||
|
||||
EditSession editSession = session.createEditSession(player);
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try {
|
||||
editSession.setBlock(clicked.toBlockPoint(), pattern);
|
||||
BlockVector3 position = clicked.toVector().toBlockPoint();
|
||||
editSession.setBlock(position, pattern.apply(position));
|
||||
} catch (MaxChangedBlocksException ignored) {
|
||||
} finally {
|
||||
session.remember(editSession);
|
||||
}
|
||||
} finally {
|
||||
if (bag != null) {
|
||||
bag.flushChanges();
|
||||
|
Loading…
Reference in New Issue
Block a user