If the data passed is empty, return an empty inventory. Try to fix the
latest issue reported in #26
This commit is contained in:
parent
f2cf051b4e
commit
88817fb9a2
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user