SteamWar/BauSystem2.0
Archiviert
12
0

Fix ColorReplaceCommand and TypeReplaceCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-12-17 12:07:54 +01:00
Ursprung d31d8b7b01
Commit 8b62559547
2 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -81,6 +81,7 @@ public class ColorReplaceCommand extends SWCommand {
SpecialReplace specialReplace = new SpecialReplace(editSession, replacements, from.getKey()); SpecialReplace specialReplace = new SpecialReplace(editSession, replacements, from.getKey());
int affected = editSession.replaceBlocks(region, specialReplace, specialReplace); int affected = editSession.replaceBlocks(region, specialReplace, specialReplace);
editSession.flushSession(); editSession.flushSession();
WorldEditUtils.addToPlayer(player, editSession);
BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(affected)})); BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(affected)}));
} }

Datei anzeigen

@ -99,6 +99,7 @@ public class TypeReplaceCommand extends SWCommand {
}); });
int affected = editSession.replaceBlocks(region, specialReplace, specialReplace); int affected = editSession.replaceBlocks(region, specialReplace, specialReplace);
editSession.flushSession(); editSession.flushSession();
WorldEditUtils.addToPlayer(player, editSession);
BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(affected)})); BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(affected)}));
} }