mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
code cleanup
This commit is contained in:
parent
ab41129d6b
commit
2396db25ad
@ -2,6 +2,8 @@ package io.github.thebusybiscuit.slimefun4.utils;
|
||||
import org.bukkit.block.Block;
|
||||
public final class BlockUtils {
|
||||
|
||||
private BlockUtils() {}
|
||||
|
||||
public static boolean hasInventory(Block block) {
|
||||
if (block == null) return false;
|
||||
|
||||
|
@ -15,7 +15,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.gson.*;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
@ -388,8 +390,10 @@ public class BlockStorage {
|
||||
}
|
||||
jsonWriter.endObject();
|
||||
return stringWriter.toString();
|
||||
} catch (IOException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
catch (IOException x) {
|
||||
Slimefun.getLogger().log(Level.SEVERE, "An error occurred while serializing BlockInfo", x);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user