mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-28 20:18:32 +01:00
Permit use of /questadmin setstage with spaced quest names, fixes #1211
This commit is contained in:
parent
37a6cb438a
commit
17ee93d7e8
@ -1224,7 +1224,7 @@ public class CmdExecutor implements CommandExecutor {
|
||||
int stage = -1;
|
||||
if (args.length > 3) {
|
||||
try {
|
||||
stage = Integer.parseInt(args[3]);
|
||||
stage = Integer.parseInt(args[args.length - 1]);
|
||||
} catch (NumberFormatException e) {
|
||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("inputNum"));
|
||||
}
|
||||
|
@ -1068,9 +1068,11 @@ public class PlayerListener implements Listener {
|
||||
if (plugin.canUseQuests(uuid)) {
|
||||
Quester quester = plugin.getQuester(uuid);
|
||||
for (Quest quest : plugin.getQuests()) {
|
||||
if (quester.getCurrentQuests().containsKey(quest)
|
||||
&& quester.getCurrentStage(quest).containsObjective("reachLocation")) {
|
||||
quester.reachLocation(quest, location);
|
||||
if (quester.getCurrentQuests().containsKey(quest)) {
|
||||
if (quester.getCurrentStage(quest) != null
|
||||
&& quester.getCurrentStage(quest).containsObjective("reachLocation")) {
|
||||
quester.reachLocation(quest, location);
|
||||
}
|
||||
}
|
||||
|
||||
quester.dispatchMultiplayerEverything(quest, "reachLocation", (Quester q) -> {
|
||||
|
Loading…
Reference in New Issue
Block a user