Fix class cast exception when creating int attributes

This commit is contained in:
atomicint
2016-02-07 14:41:22 -05:00
parent 6c2edb8efd
commit 0c10acafdd
2 changed files with 1 additions and 2 deletions
@@ -113,7 +113,7 @@ public final class AttributeMap {
private <T> Attribute<?> createAttribute(T value, AttributeType type) {
switch (type) {
case LONG:
return new NumericalAttribute((Long) value);
return new NumericalAttribute(((Number) value).longValue());
case DOUBLE:
return new NumericalAttribute((Double) value);
case STRING:
@@ -1,6 +1,5 @@
package org.apollo.game.model.entity.attr;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;