Change the method to accept a string and feed it a string instead

This commit is contained in:
Andrew 2013-07-13 08:19:24 +12:00
parent fd6de1c47c
commit dcc3fcea50
2 changed files with 4 additions and 5 deletions

View File

@ -2,12 +2,11 @@ package me.libraryaddict.disguise.DisguiseTypes;
import java.util.HashMap;
import net.minecraft.server.v1_6_R2.IAttribute;
public class Values {
private static HashMap<DisguiseType, HashMap<String, Double>> attributesValues = new HashMap<DisguiseType, HashMap<String, Double>>();
private static HashMap<DisguiseType, HashMap<Integer, Object>> metaValues = new HashMap<DisguiseType, HashMap<Integer, Object>>();
public static HashMap<String, Double> getAttributesValues(DisguiseType type) {
if (type == DisguiseType.DONKEY || type == DisguiseType.MULE || type == DisguiseType.ZOMBIE_HORSE
|| type == DisguiseType.SKELETON_HORSE)
@ -40,8 +39,8 @@ public class Values {
attributesValues.put(this.type, new HashMap<String, Double>());
}
public void setAttributesValue(IAttribute no, Double value) {
attributesValues.get(type).put(no.a(), value);
public void setAttributesValue(String attribute, Double value) {
attributesValues.get(type).put(attribute, value);
}
public void setMetaValue(int no, Object value) {

View File

@ -267,7 +267,7 @@ public class LibsDisguises extends JavaPlugin implements Listener {
value.setMetaValue(watch.a(), watch.b());
if (entity instanceof EntityLiving) {
EntityLiving livingEntity = (EntityLiving) entity;
value.setAttributesValue(GenericAttributes.d, livingEntity.getAttributeInstance(GenericAttributes.d)
value.setAttributesValue(GenericAttributes.d.a(), livingEntity.getAttributeInstance(GenericAttributes.d)
.getValue());
}
} catch (Exception e1) {