mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-27 13:15:55 +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,10 +1068,12 @@ public class PlayerListener implements Listener {
|
||||
if (plugin.canUseQuests(uuid)) {
|
||||
Quester quester = plugin.getQuester(uuid);
|
||||
for (Quest quest : plugin.getQuests()) {
|
||||
if (quester.getCurrentQuests().containsKey(quest)
|
||||
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) -> {
|
||||
q.reachLocation(quest, location);
|
||||
|
Loading…
Reference in New Issue
Block a user