mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-24 03:25:20 +01:00
Solve kill-players objective not showing, part 2. Fixes #598
This commit is contained in:
parent
50ad660cf5
commit
0857f1079d
@ -1970,14 +1970,20 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (obj.contains(Lang.get(quester.getPlayer(), "kill"))) {
|
} else if (obj.contains(Lang.get(quester.getPlayer(), "kill"))) {
|
||||||
|
if (stage.mobsToKill == null || stage.mobsToKill.isEmpty()) {
|
||||||
|
// Could be Kill a Player objective
|
||||||
|
quester.getPlayer().sendMessage(obj);
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (EntityType type : stage.mobsToKill) {
|
for (EntityType type : stage.mobsToKill) {
|
||||||
try {
|
try {
|
||||||
EntityType et = EntityType.valueOf(serial.toUpperCase().replace(" ", "_"));
|
EntityType et = EntityType.valueOf(serial.toUpperCase().replace(" ", "_"));
|
||||||
if (et.equals(type)) {
|
if (et.equals(type)) {
|
||||||
query.sendMessage(quester.getPlayer(), obj.replace(serial, "<mob>"), type);
|
query.sendMessage(quester.getPlayer(), obj.replace(serial, "<mob>"), type);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} catch (IllegalArgumentException iae) {
|
} catch (IllegalArgumentException iae) {
|
||||||
// Could be Kill a Player objective
|
// Could be Kill a Player objective
|
||||||
quester.getPlayer().sendMessage(obj);
|
quester.getPlayer().sendMessage(obj);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user