2013-07-11 20:36:55 +02:00
|
|
|
package me.libraryaddict.disguise.DisguiseTypes;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
public class Values {
|
|
|
|
|
|
|
|
private static HashMap<DisguiseType, HashMap<String, Double>> attributesValues = new HashMap<DisguiseType, HashMap<String, Double>>();
|
2013-07-11 20:38:38 +02:00
|
|
|
private static HashMap<DisguiseType, HashMap<Integer, Object>> metaValues = new HashMap<DisguiseType, HashMap<Integer, Object>>();
|
2013-07-12 22:19:24 +02:00
|
|
|
|
2013-07-11 20:38:38 +02:00
|
|
|
public static HashMap<String, Double> getAttributesValues(DisguiseType type) {
|
2013-07-11 20:36:55 +02:00
|
|
|
if (type == DisguiseType.DONKEY || type == DisguiseType.MULE || type == DisguiseType.ZOMBIE_HORSE
|
|
|
|
|| type == DisguiseType.SKELETON_HORSE)
|
|
|
|
type = DisguiseType.HORSE;
|
|
|
|
if (type == DisguiseType.MINECART_CHEST || type == DisguiseType.MINECART_FURNACE || type == DisguiseType.MINECART_HOPPER
|
|
|
|
|| type == DisguiseType.MINECART_TNT || type == DisguiseType.MINECART_MOB_SPAWNER)
|
|
|
|
type = DisguiseType.MINECART_RIDEABLE;
|
|
|
|
if (type == DisguiseType.WITHER_SKELETON)
|
|
|
|
type = DisguiseType.SKELETON;
|
2013-07-11 20:38:38 +02:00
|
|
|
return attributesValues.get(type);
|
2013-07-11 20:36:55 +02:00
|
|
|
}
|
|
|
|
|
2013-07-11 20:38:38 +02:00
|
|
|
public static HashMap<Integer, Object> getMetaValues(DisguiseType type) {
|
2013-07-11 20:36:55 +02:00
|
|
|
if (type == DisguiseType.DONKEY || type == DisguiseType.MULE || type == DisguiseType.ZOMBIE_HORSE
|
|
|
|
|| type == DisguiseType.SKELETON_HORSE)
|
|
|
|
type = DisguiseType.HORSE;
|
|
|
|
if (type == DisguiseType.MINECART_CHEST || type == DisguiseType.MINECART_FURNACE || type == DisguiseType.MINECART_HOPPER
|
|
|
|
|| type == DisguiseType.MINECART_TNT || type == DisguiseType.MINECART_MOB_SPAWNER)
|
|
|
|
type = DisguiseType.MINECART_RIDEABLE;
|
|
|
|
if (type == DisguiseType.WITHER_SKELETON)
|
|
|
|
type = DisguiseType.SKELETON;
|
2013-07-11 20:38:38 +02:00
|
|
|
return metaValues.get(type);
|
|
|
|
}
|
|
|
|
|
|
|
|
private DisguiseType type;
|
|
|
|
|
|
|
|
public Values(DisguiseType type) {
|
|
|
|
this.type = type;
|
|
|
|
metaValues.put(this.type, new HashMap<Integer, Object>());
|
|
|
|
attributesValues.put(this.type, new HashMap<String, Double>());
|
|
|
|
}
|
|
|
|
|
2013-07-12 22:19:24 +02:00
|
|
|
public void setAttributesValue(String attribute, Double value) {
|
|
|
|
attributesValues.get(type).put(attribute, value);
|
2013-07-11 20:38:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setMetaValue(int no, Object value) {
|
|
|
|
metaValues.get(type).put(no, value);
|
2013-07-11 20:36:55 +02:00
|
|
|
}
|
|
|
|
}
|