mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 11:26:42 +00:00
Various major
Add regen Add //history [find|restore|rollback|summary|clear] - history commands are interactable - inspect brush info is interactable Commands are now logged to a searchable database Fix some cases of id/ordinal mismatch
This commit is contained in:
@ -62,7 +62,7 @@ public class AreaPickaxe implements BlockTool {
|
||||
return false;
|
||||
}
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "AreaPickaxe")) {
|
||||
editSession.getSurvivalExtent().setToolUse(config.superPickaxeManyDrop);
|
||||
|
||||
try {
|
||||
|
@ -85,7 +85,7 @@ public class BlockDataCyler implements DoubleActionBlockTool {
|
||||
Property<Object> objProp = (Property<Object>) currentProperty;
|
||||
BlockState newBlock = block.with(objProp, currentProperty.getValues().get(index));
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "BlockDataCyler")) {
|
||||
editSession.disableBuffering();
|
||||
|
||||
try {
|
||||
|
@ -54,7 +54,7 @@ public class BlockReplacer implements DoubleActionBlockTool {
|
||||
public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked) {
|
||||
BlockBag bag = session.getBlockBag(player);
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "BlockReplacer")) {
|
||||
try {
|
||||
BlockVector3 position = clicked.toVector().toBlockPoint();
|
||||
editSession.setBlock(position, pattern);
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.command.tool;
|
||||
|
||||
import static com.boydti.fawe.object.brush.BrushSettings.SettingType.BRUSH;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
@ -110,7 +111,6 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
||||
private transient BrushSettings context = primary;
|
||||
|
||||
private transient PersistentChunkSendProcessor visualExtent;
|
||||
private transient Lock lock = new ReentrantLock();
|
||||
|
||||
private transient BaseItem holder;
|
||||
|
||||
@ -210,7 +210,6 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
|
||||
lock = new ReentrantLock();
|
||||
boolean multi = stream.readBoolean();
|
||||
primary = (BrushSettings) stream.readObject();
|
||||
if (multi) {
|
||||
@ -497,7 +496,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
||||
player.print(TranslatableComponent.of("fawe.error.no.perm" , StringMan.join(current.getPermissions(), ",")));
|
||||
return false;
|
||||
}
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, current.toString())) {
|
||||
Location target = player.getBlockTrace(getRange(), true, traceMask);
|
||||
|
||||
if (target == null) {
|
||||
@ -639,7 +638,9 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
||||
BrushSettings current = getContext();
|
||||
Brush brush = current.getBrush();
|
||||
if (brush == null) return;
|
||||
|
||||
EditSessionBuilder builder = new EditSessionBuilder(player.getWorld())
|
||||
.command(current.toString())
|
||||
.player(player)
|
||||
.allowedRegionsEverywhere()
|
||||
.autoQueue(false)
|
||||
|
@ -78,7 +78,7 @@ public class FloatingTreeRemover implements BlockTool {
|
||||
return true;
|
||||
}
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "FloatingTreeRemover")) {
|
||||
try {
|
||||
final Set<BlockVector3> blockSet = bfs(world, clicked.toVector().toBlockPoint());
|
||||
if (blockSet == null) {
|
||||
|
@ -73,7 +73,7 @@ public class FloodFillTool implements BlockTool {
|
||||
return true;
|
||||
}
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "FloodFillTool")) {
|
||||
try {
|
||||
Mask mask = initialType.toMask(editSession);
|
||||
BlockReplace function = new BlockReplace(editSession, pattern);
|
||||
|
@ -59,7 +59,7 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
|
||||
if (pos == null) return false;
|
||||
BlockBag bag = session.getBlockBag(player);
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "LongRangeBuildTool")) {
|
||||
try {
|
||||
editSession.disableBuffering();
|
||||
BlockVector3 blockPoint = pos.toVector().toBlockPoint();
|
||||
@ -87,7 +87,7 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
|
||||
if (pos == null) return false;
|
||||
BlockBag bag = session.getBlockBag(player);
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "LongRangeBuildTool")) {
|
||||
try {
|
||||
editSession.disableBuffering();
|
||||
BlockVector3 blockPoint = pos.toVector().toBlockPoint();
|
||||
|
@ -72,7 +72,7 @@ public class RecursivePickaxe implements BlockTool {
|
||||
return false;
|
||||
}
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
try (EditSession editSession = session.createEditSession(player, "RecursivePickaxe")) {
|
||||
editSession.getSurvivalExtent().setToolUse(config.superPickaxeManyDrop);
|
||||
|
||||
final int radius = (int) range;
|
||||
|
Reference in New Issue
Block a user