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