mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 02:25:42 +01:00
Update for MC 1.17. Bump version
This commit is contained in:
parent
cefe3367f5
commit
a8412c948d
2
dist/pom.xml
vendored
2
dist/pom.xml
vendored
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>4.0.4</version>
|
||||
<version>4.0.5</version>
|
||||
</parent>
|
||||
<artifactId>quests-dist</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>4.0.4</version>
|
||||
<version>4.0.5</version>
|
||||
</parent>
|
||||
<artifactId>quests-main</artifactId>
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alessiodp.parties</groupId>
|
||||
<artifactId>parties-api</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.1.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -131,7 +131,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.PikaMug</groupId>
|
||||
<artifactId>LocaleLib</artifactId>
|
||||
<version>-SNAPSHOT</version>
|
||||
<version>398781f85e</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
|
@ -828,8 +828,15 @@ public class Quest implements Comparable<Quest> {
|
||||
}
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && text.contains("<item>")) {
|
||||
plugin.getLocaleManager().sendMessage(p, text, i.getType(), i.getDurability(),
|
||||
i.getEnchantments());
|
||||
if (!plugin.getLocaleManager().sendMessage(p, text, i.getType(), i.getDurability(),
|
||||
i.getEnchantments())) {
|
||||
for (final Entry<Enchantment, Integer> e : i.getEnchantments().entrySet()) {
|
||||
text = text.replaceFirst("<enchantment>", ItemUtil.getPrettyEnchantmentName(
|
||||
e.getKey()));
|
||||
text = text.replaceFirst("<level>", RomanNumeral.getNumeral(e.getValue()));
|
||||
}
|
||||
quester.sendMessage(text.replace("<item>", ItemUtil.getName(i)));
|
||||
}
|
||||
} else {
|
||||
for (final Entry<Enchantment, Integer> e : i.getEnchantments().entrySet()) {
|
||||
text = text.replaceFirst("<enchantment>", ItemUtil.getPrettyEnchantmentName(
|
||||
|
@ -2812,7 +2812,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
@ -2826,7 +2828,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
@ -2840,7 +2844,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
@ -2854,7 +2860,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
@ -2868,7 +2876,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(increment)));
|
||||
}
|
||||
@ -2883,7 +2893,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
@ -2898,7 +2910,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
@ -2913,13 +2927,25 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && is.hasItemMeta() && !is.getItemMeta().hasDisplayName()) {
|
||||
// Bukkit version is 1.9+
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments(), goal.getItemMeta());
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments(), goal.getItemMeta())) {
|
||||
for (final Entry<Enchantment, Integer> e : is.getEnchantments().entrySet()) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is))
|
||||
.replace("<enchantment>", ItemUtil.getPrettyEnchantmentName(e.getKey()))
|
||||
.replace("<level>", RomanNumeral.getNumeral(e.getValue())));
|
||||
}
|
||||
}
|
||||
} else if (plugin.getSettings().canTranslateNames() && !is.hasItemMeta()
|
||||
&& Material.getMaterial("LINGERING_POTION") == null) {
|
||||
// Bukkit version is below 1.9
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments());
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments())) {
|
||||
for (final Entry<Enchantment, Integer> e : is.getEnchantments().entrySet()) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is))
|
||||
.replace("<enchantment>", ItemUtil.getPrettyEnchantmentName(e.getKey()))
|
||||
.replace("<level>", RomanNumeral.getNumeral(e.getValue())));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (final Entry<Enchantment, Integer> e : is.getEnchantments().entrySet()) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is))
|
||||
@ -2938,13 +2964,17 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && is.hasItemMeta() && !is.getItemMeta().hasDisplayName()) {
|
||||
// Bukkit version is 1.9+
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments(), goal.getItemMeta());
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments(), goal.getItemMeta())) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
} else if (plugin.getSettings().canTranslateNames() && !is.hasItemMeta()
|
||||
&& Material.getMaterial("LINGERING_POTION") == null) {
|
||||
// Bukkit version is below 1.9
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments());
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
|
||||
goal.getEnchantments())) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
@ -2960,7 +2990,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
@ -2978,7 +3010,9 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames() && !goal.hasItemMeta()
|
||||
&& !goal.getItemMeta().hasDisplayName()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, is.getType(), is.getDurability(), null);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, is.getType(), is.getDurability(), null)) {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<item>", ItemUtil.getName(is)));
|
||||
}
|
||||
@ -3010,7 +3044,9 @@ public class Quester implements Comparable<Quester> {
|
||||
+ goal.getAmount();
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, mob, extra);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, mob, extra)) {
|
||||
sendMessage(message.replace("<mob>", MiscUtil.snakeCaseToUpperCamelCase(mob.name())));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<mob>", MiscUtil.snakeCaseToUpperCamelCase(mob.name())));
|
||||
}
|
||||
@ -3049,7 +3085,9 @@ public class Quester implements Comparable<Quester> {
|
||||
message += ChatColor.GREEN + ": " + goal.getAmount() + "/" + goal.getAmount();
|
||||
}
|
||||
if (plugin.getSettings().canTranslateNames()) {
|
||||
plugin.getLocaleManager().sendMessage(p, message, mob, extra);
|
||||
if (!plugin.getLocaleManager().sendMessage(p, message, mob, extra)) {
|
||||
sendMessage(message.replace("<mob>", MiscUtil.snakeCaseToUpperCamelCase(mob.name())));
|
||||
}
|
||||
} else {
|
||||
sendMessage(message.replace("<mob>", MiscUtil.snakeCaseToUpperCamelCase(mob.name())));
|
||||
}
|
||||
|
4
pom.xml
4
pom.xml
@ -6,12 +6,12 @@
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>4.0.4</version>
|
||||
<version>4.0.5</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/PikaMug/Quests/</url>
|
||||
|
||||
<properties>
|
||||
<revision>4.0.4</revision>
|
||||
<revision>4.0.5</revision>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>4.0.4</version>
|
||||
<version>4.0.5</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>4.0.4</version>
|
||||
<version>4.0.5</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>4.0.4</version>
|
||||
<version>4.0.5</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
Loading…
Reference in New Issue
Block a user