mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Ensure valid entity name translation, fixes #503. Bump version number
This commit is contained in:
parent
9e79d8fcb3
commit
3bd394ce12
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<version>3.4.1</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -39,7 +39,7 @@ public class ObjectiveTimer extends BukkitRunnable {
|
||||
quest.failQuest(quester);
|
||||
quester.updateJournal();
|
||||
} else {
|
||||
quester.getPlayer().sendMessage(Lang.get(quester.getPlayer(), "timerMessage").replaceAll("<time>", String.valueOf(time)));
|
||||
quester.getPlayer().sendMessage(Lang.get(quester.getPlayer(), "timerMessage").replace("<time>", String.valueOf(time)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -434,8 +434,12 @@ public class Quester {
|
||||
Material m = Material.matchMaterial(serial);
|
||||
plugin.query.sendMessage(player, s.replace(serial, "<item>"), m);
|
||||
} else if (EntityType.valueOf(serial.toUpperCase().replace(" ", "_")) != null) {
|
||||
EntityType type = EntityType.valueOf(serial.toUpperCase().replace(" ", "_"));
|
||||
plugin.query.sendMessage(player, s.replace(serial, "<mob>"), type);
|
||||
try {
|
||||
EntityType type = EntityType.valueOf(serial.toUpperCase().replace(" ", "_"));
|
||||
plugin.query.sendMessage(player, s.replace(serial, "<mob>"), type);
|
||||
} catch (IllegalArgumentException e) {
|
||||
player.sendMessage(s);
|
||||
}
|
||||
} else {
|
||||
player.sendMessage(s);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user