Skip to content

Commit

Permalink
Improved code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Foulest committed Oct 15, 2024
1 parent 4f75564 commit c108bb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/foulest/kitpvp/enchants/Enchants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c108bb2

Please sign in to comment.