First attempt at unjailing a prisoner.

This commit is contained in:
graywolf336
2013-12-28 15:08:24 -06:00
parent 17f627350b
commit 04d65088e3
8 changed files with 184 additions and 3 deletions

View File

@ -207,6 +207,8 @@ public class Util {
* @throws IOException
*/
public static Inventory fromBase64(String data) throws IOException {
if(data.isEmpty()) Bukkit.getServer().createInventory(null, 0);
try {
ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));
BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream);
@ -236,6 +238,8 @@ public class Util {
* @throws IOException
*/
public static ItemStack[] itemStackArrayFromBase64(String data) throws IOException {
if(data.isEmpty()) return new ItemStack[] {};
try {
ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));
BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream);