mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Clipboard offset pattern is now #copy@[x,y,z].
Since the parsers were changed around, unescaped commas are parsed as separate blocks now.
This commit is contained in:
parent
74bff83e38
commit
d7d2d03ee8
@ -55,7 +55,12 @@ public class ClipboardPatternParser extends InputParser<Pattern> {
|
|||||||
|
|
||||||
BlockVector3 offset = BlockVector3.ZERO;
|
BlockVector3 offset = BlockVector3.ZERO;
|
||||||
if (offsetParts.length == 2) {
|
if (offsetParts.length == 2) {
|
||||||
String[] offsetSplit = offsetParts[1].split(",");
|
String coords = offsetParts[1];
|
||||||
|
if (coords.length() < 7 // min length of `[x,y,z]`
|
||||||
|
|| coords.charAt(0) != '[' || coords.charAt(coords.length() - 1) != ']') {
|
||||||
|
throw new InputParseException("Offset specified with @ but no offset given. Use '#copy@[x,y,z]'.");
|
||||||
|
}
|
||||||
|
String[] offsetSplit = coords.substring(1, coords.length() - 1).split(",");
|
||||||
if (offsetSplit.length != 3) {
|
if (offsetSplit.length != 3) {
|
||||||
throw new InputParseException("Clipboard offset needs x,y,z coordinates.");
|
throw new InputParseException("Clipboard offset needs x,y,z coordinates.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user