1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Add a way to retrieve the raw storage

This commit is contained in:
Daniel Walsh 2021-01-26 07:30:42 +00:00 committed by GitHub
parent c2da6c5f53
commit 6c7b8fd9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,6 +360,23 @@ public class BlockStorage {
} }
} }
@Nonnull
public Map<Location, String> getStorage() {
return this.storage;
}
@Nullable
public static Map<Location, String> getStorage(@Nonnull World world) {
Validate.notNull(world, "World cannot be null!");
BlockStorage storage = getStorage(world);
if (storage != null) {
return storage.getStorage();
} else {
return null;
}
}
public static void store(Block block, ItemStack item) { public static void store(Block block, ItemStack item) {
SlimefunItem sfitem = SlimefunItem.getByItem(item); SlimefunItem sfitem = SlimefunItem.getByItem(item);