Skip to content

Commit

Permalink
Added missing long array
Browse files Browse the repository at this point in the history
  • Loading branch information
Focusvity committed Apr 27, 2020
1 parent 5a9a297 commit 7c3f540
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<groupId>me.dpohvar.powernbt</groupId>
<artifactId>PowerNBT</artifactId>
<version>0.9.1</version>
<version>0.9.1.1</version>
<packaging>jar</packaging>

<description>Powerful NBT editor for CraftBukkit 1.5 and later</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ public static NBTContainer getContainer(Caller caller, String object, String par
NBTType type = NBTType.fromString(param);
if (type.equals(NBTType.BYTEARRAY)) type = NBTType.BYTE;
else if (type.equals(NBTType.INTARRAY)) type = NBTType.INT;
else if (type.equals(NBTType.LONGARRAY)) type = NBTType.LONG;
return new NBTContainerBase(type.parse(object));
}
if (object.matches("NaN|-?Infinity"))
Expand All @@ -372,6 +373,7 @@ public static NBTContainer getContainer(Caller caller, String object, String par
NBTType type = NBTType.fromString(param);
if (type.equals(NBTType.BYTEARRAY)) type = NBTType.BYTE;
else if (type.equals(NBTType.INTARRAY)) type = NBTType.INT;
else if (type.equals(NBTType.LONGARRAY)) type = NBTType.LONG;
return new NBTContainerBase(type.parse(object));
}
if (object.matches("-?[0-9]+\\.[0-9]*"))
Expand All @@ -380,6 +382,7 @@ public static NBTContainer getContainer(Caller caller, String object, String par
NBTType type = NBTType.fromString(param);
if (type.equals(NBTType.BYTEARRAY)) type = NBTType.BYTE;
else if (type.equals(NBTType.INTARRAY)) type = NBTType.INT;
else if (type.equals(NBTType.LONGARRAY)) type = NBTType.LONG;
return new NBTContainerBase(type.parse(object));
}
if (object.equals("*") || object.equals("self") || object.equals("this"))
Expand All @@ -396,6 +399,7 @@ public static NBTContainer getContainer(Caller caller, String object, String par
NBTType type = NBTType.fromString(param);
if (type == NBTType.BYTE) type = NBTType.BYTEARRAY;
else if (type == NBTType.INT) type = NBTType.INTARRAY;
else if (type.equals(NBTType.LONGARRAY)) type = NBTType.LONG;
return new NBTContainerBase(type.parse(object));
}
}
Expand Down Expand Up @@ -563,6 +567,7 @@ public void prepare(final Action action, final NBTContainer<?> paramContainer, f
}
if (type == NBTType.BYTEARRAY) type = NBTType.BYTE;
else if (type == NBTType.INTARRAY) type = NBTType.INT;
else if (type.equals(NBTType.LONGARRAY)) type = NBTType.LONG;
if (type == NBTType.END && paramQuery != null)
{
NBTQuery parent = paramQuery.getParent();
Expand All @@ -586,6 +591,7 @@ public void prepare(final Action action, final NBTContainer<?> paramContainer, f
NBTType type = NBTType.fromBase(paramQuery.get(paramContainer.getCustomTag()));
if (type == NBTType.INT) type = NBTType.INTARRAY;
else if (type == NBTType.BYTE) type = NBTType.BYTEARRAY;
else if (type.equals(NBTType.LONG)) type = NBTType.LONGARRAY;
else if (type == null || type == NBTType.END)
{
TypeCompleter comp = plugin.getTypeCompleter();
Expand Down

0 comments on commit 7c3f540

Please sign in to comment.