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:
parent
c2da6c5f53
commit
6c7b8fd9da
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user