From 51193582523c9c9f186dbf11a2cdbaa20172169e Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 7 Apr 2020 21:31:47 +1200 Subject: [PATCH] Lets break past the limits of mortal strings, it's not always 16 chars! --- .../disguise/disguisetypes/PlayerDisguise.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index fbedf7fd..0d18eb65 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -222,8 +222,10 @@ public class PlayerDisguise extends TargetedDisguise { return; } - if (!DisguiseConfig.isExtendedDisguiseNames() && name.length() > 16) { - name = name.substring(0, 16); + int cLimit = DisguiseConfig.isExtendedDisguiseNames() ? 16 * 3 : + DisguiseConfig.isScoreboardDisguiseNames() ? 16 * 2 : 16; + if (!DisguiseConfig.isExtendedDisguiseNames() && name.length() > cLimit) { + name = name.substring(0, cLimit); } if (isDisguiseInUse()) {