From 8b62559547157a1607c015eeffcf5e98b85c5203 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 17 Dec 2022 12:07:54 +0100 Subject: [PATCH] Fix ColorReplaceCommand and TypeReplaceCommand Signed-off-by: yoyosource --- .../bausystem/features/worldedit/ColorReplaceCommand.java | 1 + .../bausystem/features/worldedit/TypeReplaceCommand.java | 1 + 2 files changed, 2 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java index 48ceff8a..1a4b4850 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java @@ -81,6 +81,7 @@ public class ColorReplaceCommand extends SWCommand { SpecialReplace specialReplace = new SpecialReplace(editSession, replacements, from.getKey()); int affected = editSession.replaceBlocks(region, specialReplace, specialReplace); editSession.flushSession(); + WorldEditUtils.addToPlayer(player, editSession); BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(affected)})); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java index a81cdf96..4535a241 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java @@ -99,6 +99,7 @@ public class TypeReplaceCommand extends SWCommand { }); int affected = editSession.replaceBlocks(region, specialReplace, specialReplace); editSession.flushSession(); + WorldEditUtils.addToPlayer(player, editSession); BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(affected)})); }