Change the method to accept a string and feed it a string instead
This commit is contained in:
parent
fd6de1c47c
commit
dcc3fcea50
@ -2,12 +2,11 @@ package me.libraryaddict.disguise.DisguiseTypes;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.IAttribute;
|
|
||||||
|
|
||||||
public class Values {
|
public class Values {
|
||||||
|
|
||||||
private static HashMap<DisguiseType, HashMap<String, Double>> attributesValues = new HashMap<DisguiseType, HashMap<String, Double>>();
|
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>>();
|
private static HashMap<DisguiseType, HashMap<Integer, Object>> metaValues = new HashMap<DisguiseType, HashMap<Integer, Object>>();
|
||||||
|
|
||||||
public static HashMap<String, Double> getAttributesValues(DisguiseType type) {
|
public static HashMap<String, Double> getAttributesValues(DisguiseType type) {
|
||||||
if (type == DisguiseType.DONKEY || type == DisguiseType.MULE || type == DisguiseType.ZOMBIE_HORSE
|
if (type == DisguiseType.DONKEY || type == DisguiseType.MULE || type == DisguiseType.ZOMBIE_HORSE
|
||||||
|| type == DisguiseType.SKELETON_HORSE)
|
|| type == DisguiseType.SKELETON_HORSE)
|
||||||
@ -40,8 +39,8 @@ public class Values {
|
|||||||
attributesValues.put(this.type, new HashMap<String, Double>());
|
attributesValues.put(this.type, new HashMap<String, Double>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAttributesValue(IAttribute no, Double value) {
|
public void setAttributesValue(String attribute, Double value) {
|
||||||
attributesValues.get(type).put(no.a(), value);
|
attributesValues.get(type).put(attribute, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMetaValue(int no, Object value) {
|
public void setMetaValue(int no, Object value) {
|
||||||
|
@ -267,7 +267,7 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
|||||||
value.setMetaValue(watch.a(), watch.b());
|
value.setMetaValue(watch.a(), watch.b());
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving) {
|
||||||
EntityLiving livingEntity = (EntityLiving) entity;
|
EntityLiving livingEntity = (EntityLiving) entity;
|
||||||
value.setAttributesValue(GenericAttributes.d, livingEntity.getAttributeInstance(GenericAttributes.d)
|
value.setAttributesValue(GenericAttributes.d.a(), livingEntity.getAttributeInstance(GenericAttributes.d)
|
||||||
.getValue());
|
.getValue());
|
||||||
}
|
}
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user