From 2c78c012c0004c0e7a7658f61439ec1d9eaed5c9 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 5 Sep 2019 18:58:48 +1200 Subject: [PATCH] Players disguised will by default, have an empty custom name on disguise to conceal if they have a custom name on the player entity. --- .../me/libraryaddict/disguise/disguisetypes/Disguise.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index 54206ff1..adcb6148 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -711,6 +711,10 @@ public abstract class Disguise { } getWatcher().setNoGravity(true); + + if (getEntity() instanceof Player && !getWatcher().hasCustomName()) { + getWatcher().setCustomName(""); + } } public Disguise setVelocitySent(boolean sendVelocity) {