From c108bb212efae90faa4a51ad68dc0c39d167bf51 Mon Sep 17 00:00:00 2001 From: Foulest <43710301+Foulest@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:45:31 -0700 Subject: [PATCH] Improved code readability --- src/main/java/net/foulest/kitpvp/enchants/Enchants.java | 6 +++--- .../java/net/foulest/kitpvp/listeners/DeathListener.java | 2 +- .../java/net/foulest/kitpvp/listeners/EventListener.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/foulest/kitpvp/enchants/Enchants.java b/src/main/java/net/foulest/kitpvp/enchants/Enchants.java index ad26c8a..2cc9266 100644 --- a/src/main/java/net/foulest/kitpvp/enchants/Enchants.java +++ b/src/main/java/net/foulest/kitpvp/enchants/Enchants.java @@ -64,7 +64,7 @@ public enum Enchants { /** * Gets the name of the enchantment in a MySQL-friendly format. - * Example: "FEATHER_FALLING" -> "featherFalling" + * Example: "FEATHER_FALLING" is converted to "featherFalling" * * @return The formatted name. */ @@ -82,7 +82,7 @@ public enum Enchants { /** * Gets the name of the enchantment in a human-friendly format. - * Example: "FEATHER_FALLING" -> "Feather Falling" + * Example: "FEATHER_FALLING" is converted to "Feather Falling" * * @return The formatted name. */ @@ -93,7 +93,7 @@ public enum Enchants { /** * Gets the corresponding enchantment cost from Settings. - * Example: "FEATHER_FALLING" -> Settings.featherFallingCost + * Example: "FEATHER_FALLING" is converted to Settings.featherFallingCost * * @return The enchant cost. */ diff --git a/src/main/java/net/foulest/kitpvp/listeners/DeathListener.java b/src/main/java/net/foulest/kitpvp/listeners/DeathListener.java index b726a02..7a8396a 100644 --- a/src/main/java/net/foulest/kitpvp/listeners/DeathListener.java +++ b/src/main/java/net/foulest/kitpvp/listeners/DeathListener.java @@ -145,7 +145,7 @@ static void handleDeath(Player receiver, boolean onPlayerQuit) { // Prints kill messages to both the damager and receiver. MessageUtil.messagePlayer(receiver.getPlayer(), "&eYou were killed by &c" + damager.getName() - + " &eon &6" + String.format("%.01f", damager.getHealth()) + "❤&e."); + + " &eon &6" + String.format("%.01f", damager.getHealth()) + "\u2764&e."); MessageUtil.messagePlayer(damager, "&eYou killed &a" + receiver.getPlayer().getName() + "&e for &a" + coinsGiven + " coins &eand &a" + experienceGiven + " exp&e."); } else { diff --git a/src/main/java/net/foulest/kitpvp/listeners/EventListener.java b/src/main/java/net/foulest/kitpvp/listeners/EventListener.java index fa7d27d..5baf17d 100644 --- a/src/main/java/net/foulest/kitpvp/listeners/EventListener.java +++ b/src/main/java/net/foulest/kitpvp/listeners/EventListener.java @@ -207,7 +207,7 @@ public static void onArrowShoot(@NotNull EntityDamageByEntityEvent event) { // Prints the Archer arrow tag message. MessageUtil.messagePlayer(damager, "&c" + receiver.getName() + " &eis on &6" - + String.format("%.01f", Math.max(receiver.getHealth() - event.getFinalDamage(), 0.0)) + "❤&e."); + + String.format("%.01f", Math.max(receiver.getHealth() - event.getFinalDamage(), 0.0)) + "\u2764&e."); // Removes arrows from the receiver's body. TaskUtil.runTaskLater(() -> ((CraftEntity) receiver).getHandle().getDataWatcher().watch(9, (byte) 0), 100L);