Leave a note about (temporary) not undoable tree tools

This commit is contained in:
NotMyFault 2021-07-27 19:45:31 +02:00
parent 77e44c80c2
commit 69067fe8c8
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,7 @@ import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.TreeGenerator.TreeType;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockType;
import org.enginehub.piston.annotation.Command;
@ -240,6 +241,9 @@ public class GenerationCommands {
@Arg(desc = "The density of the forest, between 0 and 100", def = "5")
double density
) throws WorldEditException {
//FAWE start
actor.print(TextComponent.of("Warning: This brush is currently not undo-able due to a Spigot bug!").color(TextColor.RED));
//FAWE end
checkCommandArgument(0 <= density && density <= 100, "Density must be between 0 and 100");
worldEdit.checkMaxRadius(size);
density /= 100;

View File

@ -242,6 +242,9 @@ public class ToolCommands {
TreeGenerator.TreeType type
) throws WorldEditException {
setTool(player, session, new TreePlanter(type), "worldedit.tool.tree.equip");
//FAWE start
player.print(TextComponent.of("Warning: This brush is currently not undo-able due to a Spigot bug!").color(TextColor.RED));
//FAWE end
}
@Command(