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