If a plugin you are wanting to use has requested this plugin to be installed, just download it, stick it in your plugins folder and restart your server and everything should work perfectly.
This plugin adds the ability to add metadata to blocks that persists across restarts! This is a very useful feature when you need to store information associated with blocks over a restart, such as the state of custom machines or the name of player heads.
The plugin also stores whether each block was placed by a player or if it was naturally generated. This is useful in many situations, such as if you wanted to make fortune work on gold ore, you wouldn't want players to be able to just place the gold ore, break and repeat!
/blockstore check
- Check whether a block was placed by a human and check a block's metadata
permission: blockstore.check
/blockstore info
- Get info on the loaded chunks
permission: blockstore.info
/blockstore reload
- Reload the configuration of BlockStore
permission : blockstore.reload
The default config is as follows, with the values you can give specified in comments:
Code (Text):
# All - If a chunk is loaded in game, it will be preloaded by BlockStore
# Close - If a chunk is next to a player in the game, it will be preloaded by BlockStore
# None - No chunks will be preloaded by BlockStore, chunks will be loaded as they are used
preload: 'Close'
# The time in seconds to wait after a chunk store is used to unload it
unload-time: 60
# Close - If a chunk is next to a player in the game, it will be preloaded by BlockStore
# None - No chunks will be preloaded by BlockStore, chunks will be loaded as they are used
preload: 'Close'
# The time in seconds to wait after a chunk store is used to unload it
unload-time: 60
If you are using a newer version of WorldEdit, this plugin will be able to hook into it and will mark any blocks changed by WorldEdit as natural.
Spoiler: Developers
Ok, so how do we use it?
Well, its quite simple actually, you can either:
a) add the plugin as a dependency in your plugin.yml
b) check whether the api is available to you using
Then you can use the api, which contains the methods:
All these methods are static members of the class BlockStoreApi and can be used as such:
Metadata Restrictions:
Block Metadata must be of the type
- String
- boolean
- byte
- short
- int
- long
- float
- double
and all the array subclasses of these, such as
String[] or int[][]
Note: Getting block's state during the ChunkLoadEvent or before chunks have loaded will cause the thread to block if the chunk has not already been preloaded by BlockStore. This can be fixed by running this logic asynchronously or using the retrieve methods of the API, which will handle waiting until the chunk is loaded for you.
Well, its quite simple actually, you can either:
a) add the plugin as a dependency in your plugin.yml
b) check whether the api is available to you using
Code (Text):
Bukkit.getPluginManager().getPlugin("BlockStore") != null;
Code (Text):
boolean isPlaced(Block block)
boolean isPlaced(Location loc)
retrieveIsPlaced(Plugin callingPlugin, Block block, Consumer<Boolean> consumer)
retrieveIsPlaced(Plugin callingPlugin, Location loc, Consumer<Boolean> consumer)
setPlaced(Block block, boolean placed)
setPlaced(Location loc, boolean placed)
Object getBlockMeta(Block block, Plugin plugin, String key)
Object getBlockMeta(Location loc, Plugin plugin, String key)
retrieveBlockMeta(Plugin callingPlugin, Block block, Plugin plugin, String key, Consumer<Object> consumer)
retrieveBlockMeta(Plugin callingPlugin, Location loc, Plugin plugin, String key, Consumer<Object> consumer)
Map<String, Object> getAllBlockMeta(Block block, Plugin plugin)
Map<String, Object> getAllBlockMeta(Location loc, Plugin plugin)
retrieveAllBlockMeta(Plugin callingPlugin, Block block, Plugin plugin, Consumer<Map<String, Object>> consumer)
retrieveAllBlockMeta(Plugin callingPlugin, Location loc, Plugin plugin, Consumer<Map<String, Object>> consumer)
Map<String, Object> getAllBlockMeta(Block block)
Map<String, Object> getAllBlockMeta(Location loc)
retrieveAllBlockMeta(Plugin callingPlugin, Block block, Consumer<Map<String, Map<String, Object>>> consumer)
retrieveAllBlockMeta(Plugin callingPlugin, Location loc, Consumer<Map<String, Map<String, Object>>> consumer)
boolean containsBlockMeta(Block block, Plugin plugin, String key)
boolean containsBlockMeta(Location loc, Plugin plugin, String key)
retrieveContainsBlockMeta(Plugin callingPlugin, Block block, Plugin plugin, String key, Consumer<Boolean> consumer)
retrieveContainsBlockMeta(Plugin callingPlugin, Location loc, Plugin plugin, String key, Consumer<Boolean> consumer)
setBlockMeta(Block block, Plugin plugin, String key, Object value)
setBlockMeta(Location loc, Plugin plugin, String key, Object value)
removeBlockMeta(Block block, Plugin plugin, String key)
removeBlockMeta(Location loc, Plugin plugin, String key)
boolean isPlaced(Location loc)
retrieveIsPlaced(Plugin callingPlugin, Block block, Consumer<Boolean> consumer)
retrieveIsPlaced(Plugin callingPlugin, Location loc, Consumer<Boolean> consumer)
setPlaced(Block block, boolean placed)
setPlaced(Location loc, boolean placed)
Object getBlockMeta(Block block, Plugin plugin, String key)
Object getBlockMeta(Location loc, Plugin plugin, String key)
retrieveBlockMeta(Plugin callingPlugin, Block block, Plugin plugin, String key, Consumer<Object> consumer)
retrieveBlockMeta(Plugin callingPlugin, Location loc, Plugin plugin, String key, Consumer<Object> consumer)
Map<String, Object> getAllBlockMeta(Block block, Plugin plugin)
Map<String, Object> getAllBlockMeta(Location loc, Plugin plugin)
retrieveAllBlockMeta(Plugin callingPlugin, Block block, Plugin plugin, Consumer<Map<String, Object>> consumer)
retrieveAllBlockMeta(Plugin callingPlugin, Location loc, Plugin plugin, Consumer<Map<String, Object>> consumer)
Map<String, Object> getAllBlockMeta(Block block)
Map<String, Object> getAllBlockMeta(Location loc)
retrieveAllBlockMeta(Plugin callingPlugin, Block block, Consumer<Map<String, Map<String, Object>>> consumer)
retrieveAllBlockMeta(Plugin callingPlugin, Location loc, Consumer<Map<String, Map<String, Object>>> consumer)
boolean containsBlockMeta(Block block, Plugin plugin, String key)
boolean containsBlockMeta(Location loc, Plugin plugin, String key)
retrieveContainsBlockMeta(Plugin callingPlugin, Block block, Plugin plugin, String key, Consumer<Boolean> consumer)
retrieveContainsBlockMeta(Plugin callingPlugin, Location loc, Plugin plugin, String key, Consumer<Boolean> consumer)
setBlockMeta(Block block, Plugin plugin, String key, Object value)
setBlockMeta(Location loc, Plugin plugin, String key, Object value)
removeBlockMeta(Block block, Plugin plugin, String key)
removeBlockMeta(Location loc, Plugin plugin, String key)
Code (Text):
String name = (String) BlockStoreApi.getBlockMeta(myBlock, myPlugin, "name");
Metadata Restrictions:
Block Metadata must be of the type
- String
- boolean
- byte
- short
- int
- long
- float
- double
and all the array subclasses of these, such as
String[] or int[][]
Note: Getting block's state during the ChunkLoadEvent or before chunks have loaded will cause the thread to block if the chunk has not already been preloaded by BlockStore. This can be fixed by running this logic asynchronously or using the retrieve methods of the API, which will handle waiting until the chunk is loaded for you.
The source code is available on BitBucket here.
A small, $5 donation helps me support my coding habits and provide you with awesome plugins such as this one, completely for free!
Although this plugin may appear simple (as it has been designed to be!), a huge amount of work has gone into its backend to make sure it uses CPU, memory and storage as efficiently as possible!
If this plugin helps you with your projects or servers, a small donation would be hugely appreciated!
You can donate here
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
BlockStore is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9. Downloaded 4,534 times (via Spigot). Download it and open it directly in the game.