mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Fix class cast exception when creating int attributes
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user