summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/utils/FormatUtil.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/utils/FormatUtil.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java b/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java
index ca66f5d82..e72530684 100644
--- a/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java
+++ b/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java
@@ -66,7 +66,7 @@ public class FormatUtil
}
return replaceColor(input, REPLACE_ALL_PATTERN);
}
-
+
static String replaceColor(final String input, final Pattern pattern)
{
return REPLACE_PATTERN.matcher(pattern.matcher(input).replaceAll("\u00a7$1")).replaceAll("&");
@@ -106,7 +106,7 @@ public class FormatUtil
}
return message;
}
-
+
public static String stripLogColorFormat(final String input)
{
if (input == null)
@@ -115,22 +115,22 @@ public class FormatUtil
}
return stripColor(input, LOGCOLOR_PATTERN);
}
-
+
static String stripColor(final String input, final Pattern pattern)
{
return pattern.matcher(input).replaceAll("");
}
-
+
public static String lastCode(final String input)
{
- int pos = input.lastIndexOf("\u00a7");
+ int pos = input.lastIndexOf('\u00a7');
if (pos == -1 || (pos + 1) == input.length())
{
return "";
}
return input.substring(pos, pos + 2);
}
-
+
static String blockURL(final String input)
{
if (input == null)
@@ -144,7 +144,7 @@ public class FormatUtil
}
return text;
}
-
+
public static boolean validIP(String ipAddress)
{
return IPPATTERN.matcher(ipAddress).matches();