diff --git a/Core/pom.xml b/Core/pom.xml index 319b6032..6106a170 100644 --- a/Core/pom.xml +++ b/Core/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../ diff --git a/Core/src/main/java/com/songoda/core/SongodaCore.java b/Core/src/main/java/com/songoda/core/SongodaCore.java index 34caa181..fcdb3556 100644 --- a/Core/src/main/java/com/songoda/core/SongodaCore.java +++ b/Core/src/main/java/com/songoda/core/SongodaCore.java @@ -56,7 +56,7 @@ public class SongodaCore { /** * This has been added as of Rev 6 */ - private final static String coreVersion = "2.4.50"; + private final static String coreVersion = "2.4.51"; /** * This is specific to the website api diff --git a/NMS/NMS-API/pom.xml b/NMS/NMS-API/pom.xml index 6a722de6..b6e4350c 100644 --- a/NMS/NMS-API/pom.xml +++ b/NMS/NMS-API/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java b/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java index 7bd47801..269dfc2c 100644 --- a/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java +++ b/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java @@ -21,6 +21,8 @@ public interface NBTCompound { NBTCompound set(String tag, int[] i); + NBTCompound set(String tag, byte[] b); + NBTCompound set(String tag, UUID u); NBTCompound remove(String tag); @@ -45,6 +47,8 @@ public interface NBTCompound { int[] getIntArray(String tag); + byte[] getByteArray(String tag); + NBTCompound getCompound(String tag); Set getKeys(); diff --git a/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTObject.java b/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTObject.java index 8fa3fbae..c43b12c1 100644 --- a/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTObject.java +++ b/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTObject.java @@ -20,6 +20,8 @@ public interface NBTObject { int[] asIntArray(); + byte[] asByteArray(); + Set getKeys(); NBTCompound asCompound(); diff --git a/NMS/NMS-v1_10_R1/pom.xml b/NMS/NMS-v1_10_R1/pom.xml index 60a94752..8c89461f 100644 --- a/NMS/NMS-v1_10_R1/pom.xml +++ b/NMS/NMS-v1_10_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java index 480887c5..04c306f5 100644 --- a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTItemImpl.java index ed8858d0..c4fb4426 100644 --- a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_10_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_10_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_10_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTObjectImpl.java index 8bad61b3..6df4ab6f 100644 --- a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_11_R1/pom.xml b/NMS/NMS-v1_11_R1/pom.xml index ac0b205f..7712af8f 100644 --- a/NMS/NMS-v1_11_R1/pom.xml +++ b/NMS/NMS-v1_11_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java index 8eba6c34..9680ccf0 100644 --- a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTItemImpl.java index 4c3c6b54..0712745b 100644 --- a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTItemImpl.java @@ -1,5 +1,6 @@ package com.songoda.core.nms.v1_11_R1.nbt; +import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTItem; import net.minecraft.server.v1_11_R1.NBTTagCompound; import org.bukkit.craftbukkit.v1_11_R1.inventory.CraftItemStack; @@ -7,7 +8,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_11_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_11_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_11_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); @@ -22,6 +23,17 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { } } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public void addExtras() { } diff --git a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTObjectImpl.java index 0b2a71b8..c6075963 100644 --- a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_12_R1/pom.xml b/NMS/NMS-v1_12_R1/pom.xml index 2393dc7e..15e060cc 100644 --- a/NMS/NMS-v1_12_R1/pom.xml +++ b/NMS/NMS-v1_12_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java index 61206c77..6b13d2b3 100644 --- a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTItemImpl.java index e22df8c9..e867af00 100644 --- a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_12_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_12_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_12_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTObjectImpl.java index 16b5ab1a..397f66a0 100644 --- a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_13_R1/pom.xml b/NMS/NMS-v1_13_R1/pom.xml index a09d8069..fbd00716 100644 --- a/NMS/NMS-v1_13_R1/pom.xml +++ b/NMS/NMS-v1_13_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java index 8efaeb23..70a850a1 100644 --- a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTItemImpl.java index d9059c7e..5824da51 100644 --- a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_13_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_13_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_13_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTObjectImpl.java index dbd85039..b5bdaa97 100644 --- a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.getKeys(); diff --git a/NMS/NMS-v1_13_R2/pom.xml b/NMS/NMS-v1_13_R2/pom.xml index 962ca733..35ed641b 100644 --- a/NMS/NMS-v1_13_R2/pom.xml +++ b/NMS/NMS-v1_13_R2/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java index 9f78a280..ad539766 100644 --- a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTItemImpl.java b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTItemImpl.java index 0a1ba3d9..2904c6b3 100644 --- a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTItemImpl.java @@ -1,5 +1,6 @@ package com.songoda.core.nms.v1_13_R2.nbt; +import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTItem; import net.minecraft.server.v1_13_R2.NBTTagCompound; import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack; @@ -7,7 +8,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_13_R2.ItemStack nmsItem; + private final net.minecraft.server.v1_13_R2.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_13_R2.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); @@ -22,6 +23,17 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { } } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public void addExtras() { } diff --git a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTObjectImpl.java b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTObjectImpl.java index 46c039de..b67bfac7 100644 --- a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.getKeys(); diff --git a/NMS/NMS-v1_14_R1/pom.xml b/NMS/NMS-v1_14_R1/pom.xml index a92bd3c3..cd0fda0f 100644 --- a/NMS/NMS-v1_14_R1/pom.xml +++ b/NMS/NMS-v1_14_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java index 6d8a8c9d..a62ad6a3 100644 --- a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTItemImpl.java index 1e55ebea..8d9827bc 100644 --- a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTItemImpl.java @@ -1,5 +1,6 @@ package com.songoda.core.nms.v1_14_R1.nbt; +import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTItem; import net.minecraft.server.v1_14_R1.NBTTagCompound; import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack; @@ -7,7 +8,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_14_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_14_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_14_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); @@ -22,6 +23,17 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { } } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public void addExtras() { } diff --git a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTObjectImpl.java index aa94d266..211f571a 100644 --- a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.getKeys(); diff --git a/NMS/NMS-v1_15_R1/pom.xml b/NMS/NMS-v1_15_R1/pom.xml index 57318f89..067274ad 100644 --- a/NMS/NMS-v1_15_R1/pom.xml +++ b/NMS/NMS-v1_15_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java index 151bb463..2e603a1b 100644 --- a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTEntityImpl.java b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTEntityImpl.java index d6aa5256..9343e647 100644 --- a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTEntityImpl.java +++ b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTEntityImpl.java @@ -1,5 +1,6 @@ package com.songoda.core.nms.v1_15_R1.nbt; +import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTEntity; import net.minecraft.server.v1_15_R1.BlockPosition; import net.minecraft.server.v1_15_R1.Entity; @@ -56,6 +57,17 @@ public class NBTEntityImpl extends NBTCompoundImpl implements NBTEntity { return spawn(location); } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public void addExtras() { compound.setString("entity_type", IRegistry.ENTITY_TYPE.getKey(nmsEntity.getEntityType()).toString()); diff --git a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTItemImpl.java index c71b27d8..dbd5f2f0 100644 --- a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_15_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_15_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_15_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTObjectImpl.java index 3a76e153..8f85aea4 100644 --- a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.getKeys(); diff --git a/NMS/NMS-v1_16_R1/pom.xml b/NMS/NMS-v1_16_R1/pom.xml index 4ff74e66..baea59e8 100644 --- a/NMS/NMS-v1_16_R1/pom.xml +++ b/NMS/NMS-v1_16_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTCompoundImpl.java index a243dac1..76f6533b 100644 --- a/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTItemImpl.java index dcd91660..8ee25e9a 100644 --- a/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTItemImpl.java @@ -1,5 +1,6 @@ package com.songoda.core.nms.v1_16_R1.nbt; +import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTItem; import net.minecraft.server.v1_16_R1.NBTTagCompound; import org.bukkit.craftbukkit.v1_16_R1.inventory.CraftItemStack; @@ -7,7 +8,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_16_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_16_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_16_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); @@ -22,6 +23,17 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { } } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public void addExtras() { } diff --git a/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTObjectImpl.java index 31066453..3d2968c8 100644 --- a/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_16_R1/src/com/songoda/core/nms/v1_16_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.getKeys(); diff --git a/NMS/NMS-v1_16_R2/pom.xml b/NMS/NMS-v1_16_R2/pom.xml index 18bebe69..2f855e5b 100644 --- a/NMS/NMS-v1_16_R2/pom.xml +++ b/NMS/NMS-v1_16_R2/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTCompoundImpl.java index 8753b8be..04602891 100644 --- a/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTItemImpl.java b/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTItemImpl.java index 7fbaa568..488a07d4 100644 --- a/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_16_R2.ItemStack nmsItem; + private final net.minecraft.server.v1_16_R2.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_16_R2.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTObjectImpl.java b/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTObjectImpl.java index 66af4f6e..b0a06f1d 100644 --- a/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_16_R2/src/com/songoda/core/nms/v1_16_R2/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public NBTCompound asCompound() { return new NBTCompoundImpl(compound.getCompound(tag)); diff --git a/NMS/NMS-v1_16_R3/pom.xml b/NMS/NMS-v1_16_R3/pom.xml index 9d1f28e4..2037079e 100644 --- a/NMS/NMS-v1_16_R3/pom.xml +++ b/NMS/NMS-v1_16_R3/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTCompoundImpl.java index 031640ed..65e07866 100644 --- a/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return getNBTObject(tag).asByteArray(); + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTItemImpl.java b/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTItemImpl.java index 97bac649..26089a9d 100644 --- a/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTItemImpl.java @@ -13,7 +13,7 @@ import java.io.IOException; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_16_R3.ItemStack nmsItem; + private final net.minecraft.server.v1_16_R3.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_16_R3.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); @@ -28,29 +28,6 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { } } - - @Override - public byte[] serialize(String... exclusions) { - try (ByteArrayOutputStream stream = new ByteArrayOutputStream(); BukkitObjectOutputStream bukkitStream = new BukkitObjectOutputStream(stream)) { - bukkitStream.writeObject(nmsItem); - return stream.toByteArray(); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - - @Override - public void deSerialize(byte[] serialized) { - try (BukkitObjectInputStream stream = new BukkitObjectInputStream( - new ByteArrayInputStream(serialized))) { - nmsItem = (net.minecraft.server.v1_16_R3.ItemStack) stream.readObject(); - } catch (IOException | ClassNotFoundException e) { - e.printStackTrace(); - } - - } - @Override public void addExtras() { } diff --git a/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTObjectImpl.java b/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTObjectImpl.java index bb3f2b08..56af357c 100644 --- a/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_16_R3/src/com/songoda/core/nms/v1_16_R3/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public NBTCompound asCompound() { return new NBTCompoundImpl(compound.getCompound(tag)); diff --git a/NMS/NMS-v1_8_R1/pom.xml b/NMS/NMS-v1_8_R1/pom.xml index 840aed70..022e18e3 100644 --- a/NMS/NMS-v1_8_R1/pom.xml +++ b/NMS/NMS-v1_8_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java index 94dcd1d1..b96e2a68 100644 --- a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { set(tag + "Most", u.getMostSignificantBits()); @@ -137,6 +143,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTItemImpl.java index ce8dfd93..4df19aa6 100644 --- a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_8_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_8_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_8_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTObjectImpl.java index 17a00912..235cb615 100644 --- a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_8_R2/pom.xml b/NMS/NMS-v1_8_R2/pom.xml index 55787af7..917843f4 100644 --- a/NMS/NMS-v1_8_R2/pom.xml +++ b/NMS/NMS-v1_8_R2/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java index bc3e1186..f6acb2d2 100644 --- a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { set(tag + "Most", u.getMostSignificantBits()); @@ -137,6 +143,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTItemImpl.java b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTItemImpl.java index 748bd485..d44d6952 100644 --- a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_8_R2.ItemStack nmsItem; + private final net.minecraft.server.v1_8_R2.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_8_R2.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTObjectImpl.java b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTObjectImpl.java index 05154e13..deaf3e4d 100644 --- a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_8_R3/pom.xml b/NMS/NMS-v1_8_R3/pom.xml index 7a9f6efb..011166b1 100644 --- a/NMS/NMS-v1_8_R3/pom.xml +++ b/NMS/NMS-v1_8_R3/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java index ebc03afb..76ab7449 100644 --- a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { set(tag + "Most", u.getMostSignificantBits()); @@ -137,6 +143,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTEntityImpl.java b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTEntityImpl.java index 56b1ca93..ab324c78 100644 --- a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTEntityImpl.java +++ b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTEntityImpl.java @@ -1,5 +1,6 @@ package com.songoda.core.nms.v1_8_R3.nbt; +import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTEntity; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityTypes; @@ -65,6 +66,17 @@ public class NBTEntityImpl extends NBTCompoundImpl implements NBTEntity { return spawn(location); } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public void addExtras() { String key = EntityTypes.b(nmsEntity); // Changed in 1.12 diff --git a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTItemImpl.java b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTItemImpl.java index e7e3e064..181c5e3d 100644 --- a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_8_R3.ItemStack nmsItem; + private final net.minecraft.server.v1_8_R3.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_8_R3.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTObjectImpl.java b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTObjectImpl.java index cc109ceb..1ee72562 100644 --- a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_9_R1/pom.xml b/NMS/NMS-v1_9_R1/pom.xml index d5dba8e6..842da541 100644 --- a/NMS/NMS-v1_9_R1/pom.xml +++ b/NMS/NMS-v1_9_R1/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java index ce83f25d..523a568d 100644 --- a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTItemImpl.java b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTItemImpl.java index 1bbfddd2..701630de 100644 --- a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_9_R1.ItemStack nmsItem; + private final net.minecraft.server.v1_9_R1.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_9_R1.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTObjectImpl.java b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTObjectImpl.java index e77cf650..7af6dab3 100644 --- a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/NMS/NMS-v1_9_R2/pom.xml b/NMS/NMS-v1_9_R2/pom.xml index 2250cb2a..dabd8d5c 100644 --- a/NMS/NMS-v1_9_R2/pom.xml +++ b/NMS/NMS-v1_9_R2/pom.xml @@ -3,7 +3,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 ../../ diff --git a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java index 4997b32d..fbc55232 100644 --- a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java @@ -74,6 +74,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, byte[] b) { + compound.setByteArray(tag, b); + return this; + } + @Override public NBTCompound set(String tag, UUID u) { compound.a(tag, u); @@ -136,6 +142,11 @@ public class NBTCompoundImpl implements NBTCompound { return getNBTObject(tag).asIntArray(); } + @Override + public byte[] getByteArray(String tag) { + return new byte[0]; + } + @Override public NBTCompound getCompound(String tag) { if (has(tag)) { diff --git a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTItemImpl.java b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTItemImpl.java index ec7386ad..fedf0fe6 100644 --- a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTItemImpl.java +++ b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTItemImpl.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class NBTItemImpl extends NBTCompoundImpl implements NBTItem { - private net.minecraft.server.v1_9_R2.ItemStack nmsItem; + private final net.minecraft.server.v1_9_R2.ItemStack nmsItem; public NBTItemImpl(net.minecraft.server.v1_9_R2.ItemStack nmsItem) { super(nmsItem != null && nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound()); diff --git a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTObjectImpl.java b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTObjectImpl.java index 71c79faf..5e2e339c 100644 --- a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTObjectImpl.java +++ b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTObjectImpl.java @@ -56,6 +56,11 @@ public class NBTObjectImpl implements NBTObject { return compound.getIntArray(tag); } + @Override + public byte[] asByteArray() { + return compound.getByteArray(tag); + } + @Override public Set getKeys() { return compound.c(); diff --git a/README.md b/README.md index 17db29fc..9d6b6332 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Maven Information com.songoda SongodaCore - 2.4.50 + 2.4.51 provided ``` @@ -37,6 +37,6 @@ repositories { * Artifact: ```groovy dependencies { - compileOnly 'com.songoda:SongodaCore:2.4.50' + compileOnly 'com.songoda:SongodaCore:2.4.51' } ``` \ No newline at end of file diff --git a/pom.xml b/pom.xml index 057cac73..95d5ca24 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ com.songoda SongodaCore-Modules - 2.4.50 + 2.4.51 4.0.0 pom