Sort by name
This commit is contained in:
		@@ -36,10 +36,6 @@ public class DisguiseAPI {
 | 
			
		||||
    private static JavaPlugin plugin;
 | 
			
		||||
    private static boolean soundsEnabled;
 | 
			
		||||
 | 
			
		||||
    private static void put(Object obj, Disguise disguise) {
 | 
			
		||||
        access(obj, disguise);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private synchronized static Disguise access(Object obj, Disguise... object) {
 | 
			
		||||
        if (object.length == 0)
 | 
			
		||||
            return disguises.get(obj);
 | 
			
		||||
@@ -50,10 +46,6 @@ public class DisguiseAPI {
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static Disguise get(Object obj) {
 | 
			
		||||
        return access(obj);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param Player
 | 
			
		||||
     *            - The player to disguise
 | 
			
		||||
@@ -79,6 +71,10 @@ public class DisguiseAPI {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static Disguise get(Object obj) {
 | 
			
		||||
        return access(obj);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param Disguiser
 | 
			
		||||
     * @return Disguise
 | 
			
		||||
@@ -184,6 +180,10 @@ public class DisguiseAPI {
 | 
			
		||||
        return get(disguiser) != null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static void put(Object obj, Disguise disguise) {
 | 
			
		||||
        access(obj, disguise);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param Resends
 | 
			
		||||
     *            the entity to all the watching players, which is where the magic begins
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,10 @@ public class MiscDisguise extends Disguise {
 | 
			
		||||
        this(disguiseType, true, -1, -1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds) {
 | 
			
		||||
        this(disguiseType, replaceSounds, -1, -1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds, int id, int data) {
 | 
			
		||||
        super(disguiseType, replaceSounds);
 | 
			
		||||
        if (id == -1)
 | 
			
		||||
@@ -18,10 +22,6 @@ public class MiscDisguise extends Disguise {
 | 
			
		||||
        this.data = data;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds) {
 | 
			
		||||
        this(disguiseType, replaceSounds, -1, -1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MiscDisguise(DisguiseType disguiseType, int id, int data) {
 | 
			
		||||
        this(disguiseType, true, id, data);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -56,24 +56,24 @@ public class WolfWatcher extends AgeableWatcher {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setHealth(float newHealth) {
 | 
			
		||||
        setValue(18, newHealth);
 | 
			
		||||
        sendData(18);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSitting(boolean sitting) {
 | 
			
		||||
        if (isSitting != sitting) {
 | 
			
		||||
            isSitting = sitting;
 | 
			
		||||
            updateStatus();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    public void setTamed(boolean tamed) {
 | 
			
		||||
        if (isTamed != tamed) {
 | 
			
		||||
            isTamed = tamed;
 | 
			
		||||
            updateStatus();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public void setHealth(float newHealth) {
 | 
			
		||||
        setValue(18, newHealth);
 | 
			
		||||
        sendData(18);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void updateStatus() {
 | 
			
		||||
        setValue(16, (byte) ((isTamed ? 4 : 0) + (isSitting ? 1 : 0) + (isAgressive ? 2 : 0)));
 | 
			
		||||
 
 | 
			
		||||
@@ -34,8 +34,8 @@ import com.comphenix.protocol.events.PacketEvent;
 | 
			
		||||
import com.comphenix.protocol.reflect.StructureModifier;
 | 
			
		||||
 | 
			
		||||
public class LibsDisguises extends JavaPlugin implements Listener {
 | 
			
		||||
    private String latestVersion;
 | 
			
		||||
    private String currentVersion;
 | 
			
		||||
    private String latestVersion;
 | 
			
		||||
    private String permission;
 | 
			
		||||
    private String updateMessage = ChatColor.RED + "[LibsDisguises] " + ChatColor.DARK_RED
 | 
			
		||||
            + "There is a update ready to be downloaded! You are using " + ChatColor.RED + "%s" + ChatColor.DARK_RED
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user