This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.
DispenserRefill helps you keeping your Dispensers and Droppers filled at all times while allowing maximum control over the process.
Automatic Refilling
Cooldown Times
Readable database files
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
Download WorldEdit and extract the WorldEdit.jar into your "plugins/" folder.
Give out permissions (full list available below; give dispenserrefill.* for all).
Run your server and DispenserRefill is installed.
Development
You are interested in working on the next big thing in the Bukkit/Spigot universe? No problem! Contact us at [email protected] and tell us a little bit about you.
Alternatively feel free to fork our repository at GitHub to get your changes added to the official DispenserRefill builds.
Commands
/autorefill [cooldown] - Changes the container mode to infinite
/refillcooldown - Prints out the remaining cooldown time
Permissions
dispenserrefill.general.dispenser - Allows users to create infinite dispensers
dispenserrefill.general.destroy - Allows users to destroy infinite containers.
The code used as the actual key for a dispenser item is a hash of the instance used internally which is unique during the runtime.
It should be generally save to replace it with a random value because it's never ever read again. It's just there for technical purposes during the writing and reading of the database.
I have to admit though that it may collide if it's set manually so you may want to make sure you use shorter or longer random strings in there to work around that issue.
Also it may re-generate after the next reload (or dispenser change) automatically due to the change inside the class (at least it should if the hash contains absolute nonsense because all databases are re-written completely each time it gets written back to the database).
And still I'm really sorry this happened. Usually those migration features get checked through a lot before they get merged into a new plugin release (even for unstable releases like the 1.1 branch). Sadly this time an error made it into the plugin which caused the migration to not work properly.
I have DispenserRefill-1.1.0-A2.jar active, and it is working fine with dispensers.dat. In fact, I had the file there already but had disabled it, so I know I was using it before. Problem is, it never did any migration. When I updated to the latest version, it created the yml file, and started filling it with the new dispensers I added, but it never imported the old ones I have in the .dat file with 1.1.0-A2.
This IS on CB 1.5.1, so I can only assume this is why, but the plugin seems to be functioning properly otherwise.
I just have a question though. What is the "code" in the beginning of the records?
The plugin automatically detects old database files and converts it into a new shiny YAML based database. It's happing automatically during the plugin load (server boot or /reload).
The chances for it coming back are currently really low due to the fact that there were a lot versions in between which weren't even using the plain database format and converted it automatically.
You could try to install 1.1.0-A2 though which should still have support for migrating database files. After that you should be able to just upgrade to 1.1.0-A3 without any problems.
I'm not sure about that though. I'm sorry if you really loose that much data but the codebase had to be cleaned up a lot and I didn't expect anyone to use a version which won't even run on current CB builds.
(It's usually not part of the Evil-Co project guidelines to drop support for database formats without providing a migration tool but in this case it seemed to be pointless to keep the code which isn't even used for most servers while people are already complaining about the additional memory/HDD space allocated by WorldEdit (which I'll totally remove in 1.1.0)).
Would it take too much to add the migration tool back in? I have 2300+ dispensers that got broken in the upgrade. :( I didn't realize I had to migrate them on the previous version.
I tried to do it manually, and I got most of it, but I don't know what that seemingly random code is at the beginning of the line. I left the quotes empty, but it just deletes those records when I start the server. Can I just fill it in with random numbers? (It would still take a long time to do that manually though)
Version 1.1.0-A3 removed the migration for old database files. Sorry but I didn't expect anyone to be still sticking with such an old version which wasn't even running on CB-1.3+ (or something like that).
Because this comes up again and again: Please double-check that you're using the correct version of the plugin before posting any error reports. CB 1.6.2-0.1 IS compatible and runs without any problems with version 1.1.0-A3.
The direct download link leads to the latest stable which has been built for Minecraft 1.1 and WILL crash. This is caused by BukkitDev itself and I can't change this behavior in any way!**
Everytime a dispenser that is "infinate" throws out an item, this error occurs. It literally spits this exception for each item thrown out... Not joking... I am using WE5.5.8 snapshot2567..... and dispenserrefill1.0.0 (when I clearly dloaded 1.1.0-A3) Bukkit 1.6.2 Beta
A few questions for you:
Did you install the 1.1.0-A3 version of the plugin? Does the /autorefill command give any errors? Does there /refillcooldown command give out anything when you face the dispenser?
I just checked through everything with CB 1.6.2-R0.1 (which is the current stable beta version) and everything works fine.
I'd recommend you to completely reinstall the plugin (you'll need to grab Alpha 3 due to the fact that Alpha 2 contains some serious problems with the database API which may cause this problem).
15.08 03:22:39 [Server] SEVERE ... 19 more
15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:533)
15.08 03:22:39 [Server] SEVERE at java.lang.reflect.Method.invoke(Unknown Source)
15.08 03:22:39 [Server] SEVERE at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
15.08 03:22:39 [Server] SEVERE at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
15.08 03:22:39 [Server] SEVERE at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.commands.GeneralCommands.autorefill(GeneralCommands.java:102)
15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.DispenserRefillPlugin.saveDatabase(DispenserRefillPlugin.java:193)
15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.database.YAMLDatabase.save(YAMLDatabase.java:154)
15.08 03:22:39 [Server] SEVERE Caused by: java.lang.NullPointerException
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:837)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:880)
15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:962)
15.08 03:22:39 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523)
15.08 03:22:39 [Server] SEVERE at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:191)
15.08 03:22:39 [Server] SEVERE at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.DispenserRefillPlugin.onCommand(DispenserRefillPlugin.java:121)
15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:409)
15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:520)
15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:543)
15.08 03:22:39 [Server] SEVERE com.sk89q.minecraft.util.commands.WrappedCommandException: java.lang.NullPointerException
The dispenser don't stay infinite i've done autorefill and autorefill -1 but it doesn't stay infinite it will come up with and error in the console other then that.
Doesn't seem to be working for me. So i placed a dispencer, typed in /autorefill -1. "The dispencer has become infinite" I put some arrows in, but when i shoot arrows keep vanishing. Please, help.
I tested this with craftbukkit-1.6.2-R0.1-2839 (new beta release) and worldedit-5.5.7 and I don't believe it is working. I place an item in the dispenser, enable it with /autorefill 600. When I click the dispenser switch the first time, the item dispenses. I check /refillcooldown and see the ticks counting off. If I click the dispenser before the cooldown count ends, it dispenses a second item. Click a third time before the countdown ends and this time I can't dispense again. However, if I right click on the dispenser, it shows the dispenser is completely empty. When the cooldown time says "There is no cooldown left", the dispenser remains empty.
If I am doing something wrong, I'd appreciate the advice. I understand I am testing an unsupported version. I was just testing after seeing this comment.
@Talphin
The code used as the actual key for a dispenser item is a hash of the instance used internally which is unique during the runtime.
It should be generally save to replace it with a random value because it's never ever read again. It's just there for technical purposes during the writing and reading of the database.
I have to admit though that it may collide if it's set manually so you may want to make sure you use shorter or longer random strings in there to work around that issue.
Also it may re-generate after the next reload (or dispenser change) automatically due to the change inside the class (at least it should if the hash contains absolute nonsense because all databases are re-written completely each time it gets written back to the database).
And still I'm really sorry this happened. Usually those migration features get checked through a lot before they get merged into a new plugin release (even for unstable releases like the 1.1 branch). Sadly this time an error made it into the plugin which caused the migration to not work properly.
@dot_start
It's not working. :(
I have DispenserRefill-1.1.0-A2.jar active, and it is working fine with dispensers.dat. In fact, I had the file there already but had disabled it, so I know I was using it before. Problem is, it never did any migration. When I updated to the latest version, it created the yml file, and started filling it with the new dispensers I added, but it never imported the old ones I have in the .dat file with 1.1.0-A2.
This IS on CB 1.5.1, so I can only assume this is why, but the plugin seems to be functioning properly otherwise.
I just have a question though. What is the "code" in the beginning of the records?
Example: '
#This code?
#': {world:#
#, x:#, y:
#, z:#, cooldown: -1}
Can I just spoof that and fill it with random numbers, or are the numbers actually associated with coords or something?
@Talphin
The plugin automatically detects old database files and converts it into a new shiny YAML based database. It's happing automatically during the plugin load (server boot or /reload).
@dot_start
I can't seem to be able to find any sort of guide about how to use the migration tool anywhere. Is there a single command?
@Talphin
The chances for it coming back are currently really low due to the fact that there were a lot versions in between which weren't even using the plain database format and converted it automatically.
You could try to install 1.1.0-A2 though which should still have support for migrating database files. After that you should be able to just upgrade to 1.1.0-A3 without any problems.
I'm not sure about that though. I'm sorry if you really loose that much data but the codebase had to be cleaned up a lot and I didn't expect anyone to use a version which won't even run on current CB builds.
(It's usually not part of the Evil-Co project guidelines to drop support for database formats without providing a migration tool but in this case it seemed to be pointless to keep the code which isn't even used for most servers while people are already complaining about the additional memory/HDD space allocated by WorldEdit (which I'll totally remove in 1.1.0)).
Would it take too much to add the migration tool back in? I have 2300+ dispensers that got broken in the upgrade. :( I didn't realize I had to migrate them on the previous version.
I tried to do it manually, and I got most of it, but I don't know what that seemingly random code is at the beginning of the line. I left the quotes empty, but it just deletes those records when I start the server. Can I just fill it in with random numbers? (It would still take a long time to do that manually though)
@Mixon87
Version 1.1.0-A3 removed the migration for old database files. Sorry but I didn't expect anyone to be still sticking with such an old version which wasn't even running on CB-1.3+ (or something like that).
latest version is using some kind of file 'container' and old storage file is not working any more.... all my hundreds of dispencers are * ... ;*(
Because this comes up again and again: Please double-check that you're using the correct version of the plugin before posting any error reports. CB 1.6.2-0.1 IS compatible and runs without any problems with version 1.1.0-A3.
The direct download link leads to the latest stable which has been built for Minecraft 1.1 and WILL crash. This is caused by BukkitDev itself and I can't change this behavior in any way!**
Everytime a dispenser that is "infinate" throws out an item, this error occurs. It literally spits this exception for each item thrown out... Not joking... I am using WE5.5.8 snapshot2567..... and dispenserrefill1.0.0 (when I clearly dloaded 1.1.0-A3) Bukkit 1.6.2 Beta
http://pastebin.com/FpjvcW74
@V0ROBEY
A few questions for you: Did you install the 1.1.0-A3 version of the plugin? Does the /autorefill command give any errors? Does there /refillcooldown command give out anything when you face the dispenser?
i'm using 1.6.2 as well, but it doesn't work (dispensers aren't infinite) :( No errors in console though
@XxDawnsusxX
I just checked through everything with CB 1.6.2-R0.1 (which is the current stable beta version) and everything works fine.
I'd recommend you to completely reinstall the plugin (you'll need to grab Alpha 3 due to the fact that Alpha 2 contains some serious problems with the database API which may cause this problem).
This is the error that gets put into the console:
15.08 03:22:39 [Server] SEVERE ... 19 more 15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:533) 15.08 03:22:39 [Server] SEVERE at java.lang.reflect.Method.invoke(Unknown Source) 15.08 03:22:39 [Server] SEVERE at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 15.08 03:22:39 [Server] SEVERE at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 15.08 03:22:39 [Server] SEVERE at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.commands.GeneralCommands.autorefill(GeneralCommands.java:102) 15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.DispenserRefillPlugin.saveDatabase(DispenserRefillPlugin.java:193) 15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.database.YAMLDatabase.save(YAMLDatabase.java:154) 15.08 03:22:39 [Server] SEVERE Caused by: java.lang.NullPointerException 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:837) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:880) 15.08 03:22:39 [Server] SEVERE at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:962) 15.08 03:22:39 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523) 15.08 03:22:39 [Server] SEVERE at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:191) 15.08 03:22:39 [Server] SEVERE at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52) 15.08 03:22:39 [Server] SEVERE at org.evilco.bukkit.DispenserRefill.DispenserRefillPlugin.onCommand(DispenserRefillPlugin.java:121) 15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:409) 15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:520) 15.08 03:22:39 [Server] SEVERE at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:543) 15.08 03:22:39 [Server] SEVERE com.sk89q.minecraft.util.commands.WrappedCommandException: java.lang.NullPointerException
@XxDawnsusxX
I can't help you with the problem without the exact error line. And really important: Only the current alpha version works with current Bukkit builds!
The dispenser don't stay infinite i've done autorefill and autorefill -1 but it doesn't stay infinite it will come up with and error in the console other then that.
@V0ROBEY
You need to run the current Alpha version as of Bukkit 1.5 (or something around that). If that doesn't help: Check your server console for errors.
Doesn't seem to be working for me. So i placed a dispencer, typed in /autorefill -1. "The dispencer has become infinite" I put some arrows in, but when i shoot arrows keep vanishing. Please, help.
@brian163b
If a dispenser runs out during cooldown time it remains empty. That's currently not a bug it's actually intended to be that way.
This behavior will change in the next few versions (even though I'm still not sure what the restrictions for that will be).
I tested this with craftbukkit-1.6.2-R0.1-2839 (new beta release) and worldedit-5.5.7 and I don't believe it is working. I place an item in the dispenser, enable it with /autorefill 600. When I click the dispenser switch the first time, the item dispenses. I check /refillcooldown and see the ticks counting off. If I click the dispenser before the cooldown count ends, it dispenses a second item. Click a third time before the countdown ends and this time I can't dispense again. However, if I right click on the dispenser, it shows the dispenser is completely empty. When the cooldown time says "There is no cooldown left", the dispenser remains empty.
If I am doing something wrong, I'd appreciate the advice. I understand I am testing an unsupported version. I was just testing after seeing this comment.
@dot_start