diff --git a/src/main/java/com/cjburkey/claimchunk/Utils.java b/src/main/java/com/cjburkey/claimchunk/Utils.java index f3c091f2..9b749610 100644 --- a/src/main/java/com/cjburkey/claimchunk/Utils.java +++ b/src/main/java/com/cjburkey/claimchunk/Utils.java @@ -109,7 +109,9 @@ public static void toPlayer(@NotNull Player ply, @NotNull BaseComponent msg) { } public static void toPlayer(Player ply, String text) { - toPlayer(ply, toComponent(ply, text)); + if (!text.isBlank()) { + toPlayer(ply, toComponent(ply, text)); + } } /** diff --git a/src/main/java/com/cjburkey/claimchunk/config/ClaimChunkWorldProfile.java b/src/main/java/com/cjburkey/claimchunk/config/ClaimChunkWorldProfile.java index faf2c1ef..1356de13 100644 --- a/src/main/java/com/cjburkey/claimchunk/config/ClaimChunkWorldProfile.java +++ b/src/main/java/com/cjburkey/claimchunk/config/ClaimChunkWorldProfile.java @@ -536,7 +536,7 @@ public void fromCCConfig(@NotNull CCConfig config) { if (material == null) { Utils.warn( "Material type \"%s\" not found when loading from" - + " preventAdjacent, this one will be removed!", + + " preventAdjacent, this one will be removed!", blockType); } return material; diff --git a/src/main/java/com/cjburkey/claimchunk/event/PlayerMovementHandler.java b/src/main/java/com/cjburkey/claimchunk/event/PlayerMovementHandler.java index 1b89a38d..e9e80b66 100644 --- a/src/main/java/com/cjburkey/claimchunk/event/PlayerMovementHandler.java +++ b/src/main/java/com/cjburkey/claimchunk/event/PlayerMovementHandler.java @@ -79,7 +79,9 @@ public void onPlayerMove(PlayerMoveEvent e) { } else { msg = claimChunk.getMessages().chunkLeave.replace("%%PLAYER%%", name); } - Utils.toPlayer(e.getPlayer(), msg); + if (!msg.isBlank()) { + Utils.toPlayer(e.getPlayer(), msg); + } } } } @@ -129,7 +131,7 @@ private void showTitle(Player player, Chunk newChunk) { } private void showTitleRaw(boolean isOwnerDisplay, Player player, String msg) { - if (claimChunk.chConfig().getDisplayNameOfOwner() || !isOwnerDisplay) { + if ((claimChunk.chConfig().getDisplayNameOfOwner() || !isOwnerDisplay) && !msg.isBlank()) { Utils.toPlayer(player, msg); } } diff --git a/src/main/java/com/cjburkey/claimchunk/lib/Metrics.java b/src/main/java/com/cjburkey/claimchunk/lib/Metrics.java index 9d4c7953..44f58d9c 100644 --- a/src/main/java/com/cjburkey/claimchunk/lib/Metrics.java +++ b/src/main/java/com/cjburkey/claimchunk/lib/Metrics.java @@ -66,8 +66,8 @@ public Metrics(JavaPlugin plugin, int serviceId) { .setHeader( Arrays.asList( "bStats (https://bStats.org) collects some basic information" - + " for plugin authors, like how many people use their" - + " plugin and their total player count.", + + " for plugin authors, like how many people use their" + + " plugin and their total player count.", "It's recommended to keep bStats enabled, but if you're not" + " comfortable with this, you can turn this setting off.", "There is no performance penalty associated with having metrics" diff --git a/src/main/java/com/cjburkey/claimchunk/smartcommand/CCBukkitCommand.java b/src/main/java/com/cjburkey/claimchunk/smartcommand/CCBukkitCommand.java index 98a63ba2..e1f6e9d1 100644 --- a/src/main/java/com/cjburkey/claimchunk/smartcommand/CCBukkitCommand.java +++ b/src/main/java/com/cjburkey/claimchunk/smartcommand/CCBukkitCommand.java @@ -91,7 +91,7 @@ public void removeFromMap() { } catch (Exception e) { Utils.err( "Failed to unregister command! If you are reloading, updates to permissions" - + " won't appear until a server reboot."); + + " won't appear until a server reboot."); if (Utils.getDebugEnableOverride()) { e.printStackTrace(); }