If the data passed is empty, return an empty inventory. Try to fix the

latest issue reported in #26
This commit is contained in:
graywolf336 2014-07-07 14:56:25 -05:00
parent f2cf051b4e
commit 88817fb9a2

View File

@ -247,7 +247,7 @@ public class Util {
* @throws IOException * @throws IOException
*/ */
public static Inventory fromBase64(String data) throws IOException { public static Inventory fromBase64(String data) throws IOException {
if(data.isEmpty()) Bukkit.getServer().createInventory(null, 0); if(data.isEmpty()) return Bukkit.getServer().createInventory(null, 0);
try { try {
ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data)); ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));