Permalink
Browse files

Replace escape characters in ItemSyntax.

  • Loading branch information...
me4502 committed Mar 13, 2017
1 parent 0673ab6 commit 72f03c3d23520fc3b1d52013894f7a37dbe63b9d
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/com/sk89q/craftbook/util/ItemSyntax.java
@@ -125,10 +125,10 @@ public ItemStack load(String line) throws Exception {
int amount = 1;
String[] advMetadataSplit = FSLASH_PATTERN.split(line);
- String[] nameLoreSplit = PIPE_PATTERN.split(advMetadataSplit[0]);
- String[] enchantSplit = SEMICOLON_PATTERN.split(nameLoreSplit[0]);
- String[] amountSplit = ASTERISK_PATTERN.split(enchantSplit[0], 2);
- String[] dataSplit = COLON_PATTERN.split(amountSplit[0], 2);
+ String[] nameLoreSplit = PIPE_PATTERN.split(advMetadataSplit[0].replace("\\/", "/"));
+ String[] enchantSplit = SEMICOLON_PATTERN.split(nameLoreSplit[0].replace("\\;", ";"));
+ String[] amountSplit = ASTERISK_PATTERN.split(enchantSplit[0].replace("\\*", "*"), 2);
+ String[] dataSplit = COLON_PATTERN.split(amountSplit[0].replace("\\:", ":"), 2);
try {
material = Material.getMaterial(Integer.parseInt(dataSplit[0]));

0 comments on commit 72f03c3

Please sign in to comment.