mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Allow //replace to ignore from block damage values (and force them to not be ignored with the -f flag)
This commit is contained in:
@ -73,6 +73,7 @@ public class RegionCommands {
|
||||
aliases = {"/replace"},
|
||||
usage = "[from-block] <to-block>",
|
||||
desc = "Replace all blocks in the selection with another",
|
||||
flags = "f",
|
||||
min = 1,
|
||||
max = 2
|
||||
)
|
||||
@ -88,7 +89,7 @@ public class RegionCommands {
|
||||
from = null;
|
||||
to = we.getBlockPattern(player, args.getString(0));
|
||||
} else {
|
||||
from = we.getBlocks(player, args.getString(0), true);
|
||||
from = we.getBlocks(player, args.getString(0), true, !args.hasFlag('f'));
|
||||
to = we.getBlockPattern(player, args.getString(1));
|
||||
}
|
||||
|
||||
|
@ -228,6 +228,7 @@ public class UtilityCommands {
|
||||
aliases = {"/replacenear", "replacenear"},
|
||||
usage = "<size> <from-id> <to-id>",
|
||||
desc = "Replace nearby blocks",
|
||||
flags = "f",
|
||||
min = 3,
|
||||
max = 3
|
||||
)
|
||||
@ -245,7 +246,7 @@ public class UtilityCommands {
|
||||
from = null;
|
||||
to = we.getBlockPattern(player, args.getString(1));
|
||||
} else {
|
||||
from = we.getBlocks(player, args.getString(1), true);
|
||||
from = we.getBlocks(player, args.getString(1), true, !args.hasFlag('f'));
|
||||
to = we.getBlockPattern(player, args.getString(2));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user