mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Support SimpleClans party using Unite, fixes #1615
This commit is contained in:
parent
2922808834
commit
a00a5176e2
@ -126,7 +126,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.PikaMug</groupId>
|
<groupId>com.github.PikaMug</groupId>
|
||||||
<artifactId>Unite</artifactId>
|
<artifactId>Unite</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.PikaMug</groupId>
|
<groupId>com.github.PikaMug</groupId>
|
||||||
<artifactId>Unite</artifactId>
|
<artifactId>Unite</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -3943,16 +3943,18 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
|||||||
|
|
||||||
private void loadCustomSections(final IQuest quest, final FileConfiguration config, final String questKey)
|
private void loadCustomSections(final IQuest quest, final FileConfiguration config, final String questKey)
|
||||||
throws StageFormatException, QuestFormatException {
|
throws StageFormatException, QuestFormatException {
|
||||||
final ConfigurationSection questStages = config.getConfigurationSection("quests." + questKey + ".stages.ordered");
|
final ConfigurationSection questStages = config.getConfigurationSection("quests." + questKey
|
||||||
|
+ ".stages.ordered");
|
||||||
if (questStages != null) {
|
if (questStages != null) {
|
||||||
for (final String stageNum : questStages.getKeys(false)) {
|
for (final String stageNum : questStages.getKeys(false)) {
|
||||||
if (quest == null) {
|
if (quest == null) {
|
||||||
getLogger().warning("Unable to load custom objectives because quest for " + questKey + " was null");
|
getLogger().warning("Unable to consider custom objectives because quest for " + questKey
|
||||||
|
+ " was null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (quest.getStage(Integer.parseInt(stageNum) - 1) == null) {
|
if (quest.getStage(Integer.parseInt(stageNum) - 1) == null) {
|
||||||
getLogger().severe("Unable to load custom objectives because stage" + (Integer.parseInt(stageNum) - 1)
|
getLogger().severe("Unable to load custom objectives because stage" + (Integer.parseInt(stageNum)
|
||||||
+ " for " + quest.getName() + " was null");
|
- 1) + " for " + quest.getName() + " was null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final IStage oStage = quest.getStage(Integer.parseInt(stageNum) - 1);
|
final IStage oStage = quest.getStage(Integer.parseInt(stageNum) - 1);
|
||||||
@ -3961,8 +3963,8 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
|||||||
oStage.clearCustomObjectiveData();
|
oStage.clearCustomObjectiveData();
|
||||||
oStage.clearCustomObjectiveDisplays();
|
oStage.clearCustomObjectiveDisplays();
|
||||||
if (config.contains("quests." + questKey + ".stages.ordered." + stageNum + ".custom-objectives")) {
|
if (config.contains("quests." + questKey + ".stages.ordered." + stageNum + ".custom-objectives")) {
|
||||||
final ConfigurationSection sec = config.getConfigurationSection("quests." + questKey + ".stages.ordered."
|
final ConfigurationSection sec = config.getConfigurationSection("quests." + questKey
|
||||||
+ stageNum + ".custom-objectives");
|
+ ".stages.ordered." + stageNum + ".custom-objectives");
|
||||||
if (sec != null) {
|
if (sec != null) {
|
||||||
for (final String path : sec.getKeys(false)) {
|
for (final String path : sec.getKeys(false)) {
|
||||||
final String name = sec.getString(path + ".name");
|
final String name = sec.getString(path + ".name");
|
||||||
|
Loading…
Reference in New Issue
Block a user