mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-12-01 22:53:47 +01:00
Merge branch 'development'
This commit is contained in:
commit
2b5f6673e4
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateKits</artifactId>
|
<artifactId>UltimateKits</artifactId>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<version>2.6.1</version>
|
<version>2.6.2</version>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean install</defaultGoal>
|
<defaultGoal>clean install</defaultGoal>
|
||||||
<finalName>UltimateKits-${project.version}</finalName>
|
<finalName>UltimateKits-${project.version}</finalName>
|
||||||
|
@ -111,10 +111,19 @@ public class Kit {
|
|||||||
}
|
}
|
||||||
Key key = plugin.getKeyManager().getKey(ChatColor.stripColor(item.getItemMeta().getLore().get(0)).replace(" Key", ""));
|
Key key = plugin.getKeyManager().getKey(ChatColor.stripColor(item.getItemMeta().getLore().get(0)).replace(" Key", ""));
|
||||||
|
|
||||||
if (!item.getItemMeta().getDisplayName().equals(plugin.getLocale().getMessage("interface.key.title")
|
// This is some legacy support crap.
|
||||||
.processPlaceholder("kit", name).getMessage())
|
String title = plugin.getLocale().getMessage("interface.key.title")
|
||||||
&& !item.getItemMeta().getDisplayName().equals(plugin.getLocale().getMessage("interface.key.title")
|
.processPlaceholder("kit", name).getMessage();
|
||||||
.processPlaceholder("kit", "Any").getMessage())) {
|
if (title.startsWith(ChatColor.COLOR_CHAR + "f"))
|
||||||
|
title = title.substring(2);
|
||||||
|
|
||||||
|
String titleAny = plugin.getLocale().getMessage("interface.key.title")
|
||||||
|
.processPlaceholder("kit", "Any").getMessage();
|
||||||
|
if (titleAny.startsWith(ChatColor.COLOR_CHAR + "f"))
|
||||||
|
titleAny = titleAny.substring(2);
|
||||||
|
|
||||||
|
if (!item.getItemMeta().getDisplayName().equals(title)
|
||||||
|
&& !item.getItemMeta().getDisplayName().equals(titleAny)) {
|
||||||
plugin.getLocale().getMessage("event.crate.wrongkey").sendPrefixedMessage(player);
|
plugin.getLocale().getMessage("event.crate.wrongkey").sendPrefixedMessage(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user