From b842f07c3c7c9ee4d0035184f98dc3ef918fe0ce Mon Sep 17 00:00:00 2001 From: ALS Date: Sat, 20 Feb 2021 23:54:25 +0100 Subject: [PATCH] Use getAsInt and getAsDouble --- src/main/java/net/minestom/server/utils/NBTUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/utils/NBTUtils.java b/src/main/java/net/minestom/server/utils/NBTUtils.java index 469882a7d..33c7a78f5 100644 --- a/src/main/java/net/minestom/server/utils/NBTUtils.java +++ b/src/main/java/net/minestom/server/utils/NBTUtils.java @@ -160,10 +160,10 @@ public final class NBTUtils { uuid = Utils.intArrayToUuid(uuidArray); } - final double value = attributeNBT.getNumber("Amount").doubleValue(); + final double value = attributeNBT.getAsDouble("Amount"); final String slot = attributeNBT.containsKey("Slot") ? attributeNBT.getString("Slot") : "MAINHAND"; final String attributeName = attributeNBT.getString("AttributeName"); - final int operation = attributeNBT.getNumber("Operation").intValue(); + final int operation = attributeNBT.getAsInt("Operation"); final String name = attributeNBT.getString("Name"); final Attribute attribute = Attribute.fromKey(attributeName);