mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 13:45:32 +01:00
Prevent error from short command display override list, fixes #892
This commit is contained in:
parent
fcda4d45e9
commit
0af81d81d1
@ -624,9 +624,11 @@ public class Quest {
|
||||
int index = 0;
|
||||
for (String s : rews.getCommands()) {
|
||||
if (rews.getCommandsOverrideDisplay().isEmpty() == false && rews.getCommandsOverrideDisplay().size() >= index) {
|
||||
if (rews.getCommandsOverrideDisplay().size() > index) {
|
||||
if (!rews.getCommandsOverrideDisplay().get(index).trim().equals("")) {
|
||||
player.sendMessage("- " + ChatColor.DARK_GREEN + rews.getCommandsOverrideDisplay().get(index));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
player.sendMessage("- " + ChatColor.DARK_GREEN + s);
|
||||
}
|
||||
|
@ -1714,7 +1714,8 @@ public class Quester {
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
plugin.getLogger().severe("An error has occurred with Quests. Please report on Github. Include the info below");
|
||||
plugin.getLogger().warning("index = " + index);
|
||||
plugin.getLogger().warning("locationsReached = " + getQuestData(quest).locationsReached.toString());
|
||||
plugin.getLogger().warning("currentLocation = " + location.toString());
|
||||
plugin.getLogger().warning("locationsReached = " + getQuestData(quest).locationsReached.size());
|
||||
plugin.getLogger().warning("hasReached = " + getQuestData(quest).hasReached.size());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user