From 891d8d178fdce056d43e44a6bb9bc17ab77d31fa Mon Sep 17 00:00:00 2001 From: StevenLawson Date: Tue, 12 Aug 2014 15:32:56 -0400 Subject: [PATCH] Use commons' substring function to avoid IndexOutOfBoundsExceptions. --- .../TotalFreedomMod/Listener/TFM_PlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_PlayerListener.java b/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_PlayerListener.java index d6512a0..802e051 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_PlayerListener.java +++ b/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_PlayerListener.java @@ -885,7 +885,7 @@ public class TFM_PlayerListener implements Listener try { - player.setPlayerListName(name.substring(0, 16)); + player.setPlayerListName(StringUtils.substring(name, 0, 16)); } catch (IllegalArgumentException ex) {