Disable morphs when changing kits

This commit is contained in:
Sam 2017-04-28 19:30:00 +01:00
parent 26d97bf7eb
commit 6beeec20d6

View File

@ -4,8 +4,12 @@ import com.google.common.collect.Sets;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.common.Rank;
import mineplex.core.common.util.*;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.hologram.Hologram;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.mount.Mount;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -548,6 +552,13 @@ public abstract class SuperSmash extends Game
}
}
// Deactivate morph if active
Gadget gadget = Manager.getCosmeticManager().getGadgetManager().getActive(player, GadgetType.MORPH);
if (gadget != null)
{
gadget.disable(player);
}
_playerKit.put(player, kit);
if (announce)