» Plugin category: Fun, misc, tools » What I want: Pretty much, users place an autominer (Dispenser named "&c&lMINER"). Whatever block is in front of the dispenser, is broken. (Every second). It shouldn't break/remove: water, lava, or bedrock. If there is a chest behind it, the items go straight to the chest. If not, it drops like normal. Breaking the miner should drop a miner. Not a normal dispenser. Same for explosions. » Ideas for commands: /miner give <player> <amount> /amc reload » Ideas for permissions: miner.give » When I'd like it by: As soon as possible (There is a plugin like this already, but the autominer is powered by redstone)
@The_C0MB0 I'll do this (Need to cure my boredom) What version? What shall the /amc reload command do?
Mhhh i was about to tell you that i started it xD well anyway i would have likely not finished it .-.
@The_C0MB0 Okay I think I'm finished. I'll put it here at about 5 pm UTC+0 @The_C0MB0 I'm finished, thanks for this mini project it was rather fun. Message me or reply here if you have any bugs. Enjoy! (Double post because I wanted to use the Upload a File button which isn't provided with the Edit button.)
@CraftCreeper6 Errrr... you know that you can cast a dispensers getState() to org.bukkit.material.Dispenser and that one has the dunction getFace()
@MightyOne I was running into troubles with it somewhere along the line so I changed it to this, it all works so I think I'll keep it as is. Here you go
@CraftCreeper6 Commands: you did not check if 1. the player exists/ is online. 2. if the amount is a number -> many internal errors :/ I mean... respect that you did it in a that short time but that is a necessary base
@MightyOne God I hate commands. Too many checks... EDIT: For the OP or anyone using it. The config is generated when you first start the plugin. It's all pretty simple but there are two options: DELAY - how long between each block being mined. In ticks, so seconds*20 And UNHARVESTABLE_BLOCKS - All the blocks that cannot be destroyed by the miner. The basic setup is a miner. Then a chest behind it and a block infront.
Well... since I worked on the same plugin parallel to yours, @CraftCreeper6, I'd like to post my version as well. I would say there are slight improvements to yours, like i included other inventory holding blocks to store the mined blocks and in the end I add Items in a more effective way to inventories. I did not copy anything, it is all my own creation (ok beside the concept of storing locations, that was really good). A look into the jar will prove that.
@MightyOne It's no competition. Though I agree your code is much more concise (Hate myself for using that much static. Pains me to even read it again.) I cannot actually get it to work. I get this stacktrace: Code: [19:20:18 WARN]: [AutoMiner] Task #2 for AutoMiner v1.0 generated an exception java.lang.NoSuchFieldError: BLOCK_DISPENSER_DISPENSE at me.mightyOne.autoMiner.control.MinerHandler.run(MinerHandler.java:65) ~[?:?] at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3] at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3] at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:709) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3] at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3] at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3] at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3] at java.lang.Thread.run(Unknown Source) [?:1.8.0_151] He asked for it in Spigot 1.8 so you should probably change the version.
@CraftCreeper6 ok did not read that, updated now. thank you Aaaaaand in the end @The_C0MB0 never comes online again xD