mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 18:45:27 +01:00
Account for incompatible mob targets, fixes #117. Bump version number
This commit is contained in:
parent
c670fbebc2
commit
143fae7b84
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests</artifactId>
|
<artifactId>quests</artifactId>
|
||||||
<version>3.1.5</version>
|
<version>3.1.6</version>
|
||||||
<name>quests</name>
|
<name>quests</name>
|
||||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
@ -2451,16 +2451,20 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String mobs = ChatColor.LIGHT_PURPLE + Lang.get("eventEditorMobsTitle") + "\n";
|
String mobs = ChatColor.LIGHT_PURPLE + Lang.get("eventEditorMobsTitle") + "\n";
|
||||||
final EntityType[] mobArr = EntityType.values();
|
LinkedList<EntityType> mobArr = new LinkedList<EntityType>(Arrays.asList(EntityType.values()));
|
||||||
for (int i = 0; i < mobArr.length; i++) {
|
LinkedList<EntityType> toRemove = new LinkedList<EntityType>();
|
||||||
final EntityType type = mobArr[i];
|
for (int i = 0; i < mobArr.size(); i++) {
|
||||||
if (type.isAlive() == false) {
|
final EntityType type = mobArr.get(i);
|
||||||
continue;
|
if (type.isAlive() == false || type.name().equals("PLAYER")) {
|
||||||
|
toRemove.add(type);
|
||||||
}
|
}
|
||||||
if (i < (mobArr.length - 1)) {
|
}
|
||||||
mobs += MiscUtil.getProperMobName(mobArr[i]) + ", ";
|
mobArr.removeAll(toRemove);
|
||||||
|
for (int i = 0; i < mobArr.size(); i++) {
|
||||||
|
if (i < (mobArr.size() - 1)) {
|
||||||
|
mobs += MiscUtil.getProperMobName(mobArr.get(i)) + ", ";
|
||||||
} else {
|
} else {
|
||||||
mobs += MiscUtil.getProperMobName(mobArr[i]) + "\n";
|
mobs += MiscUtil.getProperMobName(mobArr.get(i)) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt");
|
return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt");
|
||||||
|
Loading…
Reference in New Issue
Block a user