mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Fix class cast exception when creating int attributes
This commit is contained in:
1 parent
6c2edb8efd
commit
0c10acafdd
2 files changed
+1
-2
No files matched your search
@@ -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