version 2.4.27

This commit is contained in:
Brianna 2020-12-14 15:24:09 -06:00
parent 29a1ce057e
commit 9d10a730d9
20 changed files with 48 additions and 19 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../</relativePath>
</parent>

View File

@ -53,7 +53,7 @@ public class SongodaCore {
/**
* This has been added as of Rev 6
*/
private final static String coreVersion = "2.4.26";
private final static String coreVersion = "2.4.27";
/**
* This is specific to the website api

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -4,6 +4,12 @@ import com.songoda.core.nms.nbt.NBTItem;
import net.minecraft.server.v1_16_R3.NBTTagCompound;
import org.bukkit.craftbukkit.v1_16_R3.inventory.CraftItemStack;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.io.BukkitObjectInputStream;
import org.bukkit.util.io.BukkitObjectOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
@ -22,6 +28,29 @@ 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() {
}

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<relativePath>../../</relativePath>
</parent>

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.4.26</version>
<version>2.4.27</version>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>