From c5e579f608d3a6d34506c8f8d7daacf04d86ad8b Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 13 May 2014 22:26:10 +1200 Subject: [PATCH] Add helpful info for future reference --- .../disguise/utilities/DisguiseUtilities.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index ac9bb70c..98328700 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -38,15 +38,30 @@ import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.wrappers.WrappedDataWatcher; public class DisguiseUtilities { + /** + * This is a list of names which was called by other plugins. As such, don't remove from the gameProfiles as its the duty of + * the plugin to do that. + */ private static HashSet addedByPlugins = new HashSet(); + /** + * Disguises which are stored ready for a entity to be seen by a player Preferably, disguises in this should only stay in for + * a max of a second. + */ private static HashMap> futureDisguises = new HashMap>(); + /** + * A hashmap storing the uuid and skin of a playername + */ private static HashMap gameProfiles = new HashMap(); private static LibsDisguises libsDisguises; - // A internal storage of fake entity ID's I can use. - // Realistically I could probably use a ID like "4" for everyone, seeing as no one shares the ID + /** + * A internal storage of fake entity ID's each entity has. Realistically I could probably use a ID like "4" for everyone, + * seeing as no one sees each others entity ID + **/ private static HashMap selfDisguisesIds = new HashMap(); - // Store the entity IDs instead of entitys because then I can disguise entitys even before they exist - private static HashMap> targetedDisguises = new HashMap>(); + /** + * A hashmap of the uuid's of entitys, alive and dead. And their disguises in use + **/ + private static HashMap> disguisesInUse = new HashMap>(); public static void addDisguise(UUID entityId, TargetedDisguise disguise) { if (!getDisguises().containsKey(entityId)) { @@ -214,7 +229,7 @@ public class DisguiseUtilities { } public static HashMap> getDisguises() { - return targetedDisguises; + return disguisesInUse; } public static TargetedDisguise[] getDisguises(UUID entityId) {