diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCTagContainer.java b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCTagContainer.java index 37f3f5c55..f04f5fa40 100644 --- a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCTagContainer.java +++ b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCTagContainer.java @@ -30,28 +30,29 @@ public Collection getKeys() { @Override public MCTagType getType(Object key) { NamespacedKey namespacedKey = GetNamespacedKey(key); + // Check tag types in order of most frequently used if(pdc.has(namespacedKey, PersistentDataType.STRING)) { return MCTagType.STRING; - } else if(pdc.has(namespacedKey, PersistentDataType.BYTE)) { - return MCTagType.BYTE; - } else if(pdc.has(namespacedKey, PersistentDataType.SHORT)) { - return MCTagType.SHORT; } else if(pdc.has(namespacedKey, PersistentDataType.INTEGER)) { return MCTagType.INTEGER; + } else if(pdc.has(namespacedKey, PersistentDataType.BYTE)) { + return MCTagType.BYTE; + } else if(pdc.has(namespacedKey, PersistentDataType.DOUBLE)) { + return MCTagType.DOUBLE; } else if(pdc.has(namespacedKey, PersistentDataType.LONG)) { return MCTagType.LONG; } else if(pdc.has(namespacedKey, PersistentDataType.FLOAT)) { return MCTagType.FLOAT; - } else if(pdc.has(namespacedKey, PersistentDataType.DOUBLE)) { - return MCTagType.DOUBLE; + } else if(pdc.has(namespacedKey, PersistentDataType.TAG_CONTAINER)) { + return MCTagType.TAG_CONTAINER; } else if(pdc.has(namespacedKey, PersistentDataType.BYTE_ARRAY)) { return MCTagType.BYTE_ARRAY; + } else if(pdc.has(namespacedKey, PersistentDataType.SHORT)) { + return MCTagType.SHORT; } else if(pdc.has(namespacedKey, PersistentDataType.INTEGER_ARRAY)) { return MCTagType.INTEGER_ARRAY; } else if(pdc.has(namespacedKey, PersistentDataType.LONG_ARRAY)) { return MCTagType.LONG_ARRAY; - } else if(pdc.has(namespacedKey, PersistentDataType.TAG_CONTAINER)) { - return MCTagType.TAG_CONTAINER; } else if(pdc.has(namespacedKey, PersistentDataType.TAG_CONTAINER_ARRAY)) { return MCTagType.TAG_CONTAINER_ARRAY; }