forked from MagicBane/Server
parsing multi worded names
This commit is contained in:
@@ -61,7 +61,17 @@ public class EffectsParser {
|
||||
effectData.conditions = new ArrayList<>();
|
||||
|
||||
try {
|
||||
effectData.name = compiledLines.get(1).replace(" ", "").replace("\"", "").split(" ")[1];
|
||||
String rawData = compiledLines.get(1).replace(" ", "");
|
||||
if(compiledLines.get(1).contains("\"")){
|
||||
int startIndex = rawData.indexOf('"');
|
||||
int endIndex = rawData.lastIndexOf('"');
|
||||
char[] nameValue = rawData.toCharArray();
|
||||
String name = "";
|
||||
for(int i = startIndex; i < endIndex; i++){
|
||||
name += nameValue[i];
|
||||
}
|
||||
effectData.name = name;
|
||||
}
|
||||
int iconID;
|
||||
try {
|
||||
iconID = Integer.parseInt(compiledLines.get(1).replace(" ", "").split(" ")[2]);
|
||||
|
||||
Reference in New Issue
Block a user