mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 21:56:28 +01:00
Amend giving quest names with spaces, fixes #62
This commit is contained in:
parent
7123f29981
commit
380a299dd5
@ -1088,39 +1088,22 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
Quest questToGive;
|
||||
|
||||
String name = null;
|
||||
String name = "";
|
||||
|
||||
if (args.length == 3) {
|
||||
name = args[2].toLowerCase();
|
||||
} else {
|
||||
|
||||
boolean first = true;
|
||||
int lastIndex = (args.length - 1);
|
||||
int index = 0;
|
||||
for (int i = 2; i < args.length; i++) {
|
||||
|
||||
for (String s : args) {
|
||||
int lastIndex = args.length - 1;
|
||||
|
||||
if (index != 0) {
|
||||
|
||||
if (first) {
|
||||
|
||||
first = false;
|
||||
if (args.length > 2) {
|
||||
name = s.toLowerCase() + " ";
|
||||
if (i == lastIndex) {
|
||||
name = name + args[i].toLowerCase();
|
||||
} else {
|
||||
name = s.toLowerCase();
|
||||
name = name + args[i].toLowerCase() + " ";
|
||||
}
|
||||
|
||||
} else if (index == lastIndex) {
|
||||
name = name + s.toLowerCase();
|
||||
} else {
|
||||
name = name + s.toLowerCase() + " ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user