From fb38bcd99fd99ba913f3acbff01224bee58ac9c3 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 6 Nov 2013 05:36:18 +1300 Subject: [PATCH] Made the disguise class abstract, the same for the clone class --- .../disguise/disguisetypes/Disguise.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java index b9c91b41..773f765e 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -31,7 +31,7 @@ import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.reflect.StructureModifier; -public class Disguise { +public abstract class Disguise { /** * Incase I forget, this is used to access normally hidden api calls. */ @@ -52,16 +52,8 @@ public class Disguise { return hearSelfDisguise; } - public Disguise clone() { - Disguise disguise = new Disguise().createDisguise(getType(), replaceSounds()); - disguise.setViewSelfDisguise(viewSelfDisguise()); - disguise.setHearSelfDisguise(canHearSelfDisguise()); - disguise.setHideArmorFromSelf(isHidingArmorFromSelf()); - disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf()); - disguise.setVelocitySent(isVelocitySent()); - disguise.setWatcher(getWatcher().clone()); - return disguise; - } + @Override + public abstract Disguise clone(); protected Disguise createDisguise(DisguiseType newType, boolean doSounds) { if (getWatcher() != null)