Make GUI display lowercase effect names

The GUI now displays effect names in all lowercase.
This commit is contained in:
Esophose 2018-04-05 20:59:13 -06:00
parent d40f94d5c4
commit 8fd54284fa
2 changed files with 6 additions and 6 deletions

View file

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.esophose.playerparticles</groupId>
<artifactId>PlayerParticles</artifactId>
<version>5</version>
<version>5.1</version>
<name>PlayerParticles</name>
<url>https://github.com/Esophose/PlayerParticles</url>
<description>Display particles around your player using customized styles and data!</description>
@ -53,7 +53,7 @@
</excludes>
</filter>
</filters>
<outputFile>C:\Users\Esophose\Desktop\1.12.2 Dev Server\plugins\update\PlayerParticles v5.jar</outputFile>
<outputFile>C:\Users\Esophose\Desktop\1.12.2 Dev Server\plugins\update\PlayerParticles v5.1.jar</outputFile>
</configuration>
</execution>
</executions>

View file

@ -374,7 +374,7 @@ public class PlayerParticlesGui extends BukkitRunnable implements Listener {
SkullMeta currentIconMeta = (SkullMeta) currentIcon.getItemMeta();
currentIconMeta.setDisplayName(ChatColor.GREEN + player.getName());
String[] currentIconLore = new String[3];
currentIconLore[0] = ChatColor.YELLOW + "Effect: " + ChatColor.AQUA + p.getParticleEffect().getName();
currentIconLore[0] = ChatColor.YELLOW + "Effect: " + ChatColor.AQUA + p.getParticleEffect().getName().toLowerCase();
currentIconLore[1] = ChatColor.YELLOW + "Style: " + ChatColor.AQUA + p.getParticleStyle().getName();
currentIconLore[2] = ChatColor.YELLOW + "Active Data: " + ChatColor.AQUA + p.getParticleDataString();
currentIconMeta.setLore(Arrays.asList(currentIconLore));
@ -670,11 +670,11 @@ public class PlayerParticlesGui extends BukkitRunnable implements Listener {
ItemStack icon = new ItemStack(effectIcons.get(effect.name()), 1);
ItemMeta iconMeta = icon.getItemMeta();
iconMeta.setDisplayName(MessageType.GUI_ICON_NAME_COLOR.getMessage() + effect.getName());
iconMeta.setDisplayName(MessageType.GUI_ICON_NAME_COLOR.getMessage() + effect.getName().toLowerCase());
if (!isActive) {
iconMeta.setLore(Arrays.asList(MessageType.GUI_ICON_SETS_TO.getMessageReplaced("effect") + effect.getName()));
iconMeta.setLore(Arrays.asList(MessageType.GUI_ICON_SETS_TO.getMessageReplaced("effect") + effect.getName().toLowerCase()));
} else {
iconMeta.setLore(Arrays.asList(MessageType.GUI_ICON_SETS_TO.getMessageReplaced("effect") + effect.getName(), MessageType.GUI_ICON_CURRENT_ACTIVE.getMessageReplaced("effect")));
iconMeta.setLore(Arrays.asList(MessageType.GUI_ICON_SETS_TO.getMessageReplaced("effect") + effect.getName().toLowerCase(), MessageType.GUI_ICON_CURRENT_ACTIVE.getMessageReplaced("effect")));
iconMeta.addEnchant(Enchantment.ARROW_INFINITE, -1, true);
iconMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
}