Skip to content

Commit

Permalink
Backport fix for \n not working in configurable messages (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
uRyanxD authored Jan 3, 2025
1 parent 1c12d3b commit 0bea332
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: uRyanxD <[email protected]>
Date: Thu, 2 Jan 2025 20:48:39 -0300
Subject: [PATCH] Fix \n not working in configurable messages


diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index dfd1de256e15c800658e1ce8c76a587eeb310e9c..6eff16dac50cbf2c64464d40820b039dee0f8c71 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -197,7 +197,7 @@ public class SpigotConfig
public static String outdatedServerMessage = "Outdated server! I\'m still on {0}";
private static String transform(String s)
{
- return ChatColor.translateAlternateColorCodes( '&', s ).replaceAll( "\\n", "\n" );
+ return ChatColor.translateAlternateColorCodes( '&', s ).replaceAll( "\\\\n", "\n" ); // PandaSpigot - Fix \n not working in configurable messages
}
private static void messages()
{

0 comments on commit 0bea332

Please sign in to comment.