Tame Mobs stage must use valid type, fixes #482. Bump version number

This commit is contained in:
BuildTools 2018-11-28 17:44:47 -05:00
parent c06879b2ec
commit 0eea1ca978
2 changed files with 9 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>3.4.3</version>
<version>3.4.4</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>

View File

@ -3007,8 +3007,14 @@ public class CreateStagePrompt extends FixedSetPrompt {
LinkedList<String> mobTypes = new LinkedList<String>();
for (String s : input.split(" ")) {
if (Quests.getMobType(s) != null) {
mobTypes.add(Quester.prettyMobString(Quests.getMobType(s)));
context.setSessionData(pref + CK.S_TAME_TYPES, mobTypes);
final EntityType type = Quests.getMobType(s);
if (type.isAlive() || Tameable.class.isAssignableFrom(type.getEntityClass())) {
mobTypes.add(Quester.prettyMobString(type));
context.setSessionData(pref + CK.S_TAME_TYPES, mobTypes);
} else {
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorInvalidMob"));
return new TameTypesPrompt();
}
} else {
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorInvalidMob"));
return new TameTypesPrompt();