From 8fd54284fafe9343e562c5ccf2ad9b90554550ec Mon Sep 17 00:00:00 2001 From: Esophose Date: Thu, 5 Apr 2018 20:59:13 -0600 Subject: [PATCH] Make GUI display lowercase effect names The GUI now displays effect names in all lowercase. --- pom.xml | 4 ++-- .../esophose/playerparticles/gui/PlayerParticlesGui.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index de6e468..c1a2886 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.esophose.playerparticles PlayerParticles - 5 + 5.1 PlayerParticles https://github.com/Esophose/PlayerParticles Display particles around your player using customized styles and data! @@ -53,7 +53,7 @@ - C:\Users\Esophose\Desktop\1.12.2 Dev Server\plugins\update\PlayerParticles v5.jar + C:\Users\Esophose\Desktop\1.12.2 Dev Server\plugins\update\PlayerParticles v5.1.jar diff --git a/src/com/esophose/playerparticles/gui/PlayerParticlesGui.java b/src/com/esophose/playerparticles/gui/PlayerParticlesGui.java index 147e44f..f9b1f7f 100644 --- a/src/com/esophose/playerparticles/gui/PlayerParticlesGui.java +++ b/src/com/esophose/playerparticles/gui/PlayerParticlesGui.java @@ -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); }