Add new config option PlayerHideArmor to fix MM stone items on spawn

This commit is contained in:
libraryaddict
2019-11-27 09:13:12 +13:00
parent d77308dee0
commit 9ecf1cc62c
4 changed files with 18 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ public class PacketHandlerEquipment implements IPacketHandler {
@Override
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
Entity entity) {
if (packetsHandler.isCancelMeta(disguise, observer)) {
if (DisguiseConfig.isPlayerHideArmor() && packetsHandler.isCancelMeta(disguise, observer)) {
packets.clear();
PacketContainer equipPacket = sentPacket.shallowClone();

View File

@@ -380,7 +380,8 @@ public class PacketHandlerSpawn implements IPacketHandler {
// If armor must be sent because its currently not displayed and would've been sent normally
boolean delayedArmor =
(disguise.isPlayerDisguise() && disguisedEntity != observer) && disguisedEntity instanceof LivingEntity;
DisguiseConfig.isPlayerHideArmor() && (disguise.isPlayerDisguise() && disguisedEntity != observer) &&
disguisedEntity instanceof LivingEntity;
// This sends the armor packets so that the player isn't naked.
if (DisguiseConfig.isEquipmentPacketsEnabled() || delayedArmor) {
for (EquipmentSlot slot : EquipmentSlot.values()) {