Jackhammers

Discussion in 'Plugin Requests' started by Donald for Dictator, Aug 8, 2016.

Thread Status:
Not open for further replies.
  1. Plugin category: EXAMPLE

    Minecraft version: Exampleversion 19.2

    Suggested name: ExamplePlugin

    What I want: A plugin that makes custom picks, with efficiency 12, unbreaking 20 and fortune 15 (configurable?). When a block is mined, the three blocks underneath it should also be mined out instantly, taking the right durability from the pick and giving the player the items.

    Ideas for commands: /jackhammer toggle /jackhammer give (name)

    Ideas for permissions: jackhammer.toggle jackhammer.give

    When I'd like it by: soon
     
  2. Offline

    MrGeneralQ

    I don't understand your request.
     
  3. Offline

    ipodtouch0218

    I'll do this @Donald for Dictator

    @MrGeneralQ Basically:
    [​IMG]
    A BlockBreakEvent, mine the 3 below it, (if it's bedrock or un-mineable blocks don't break it).
    use #getDrops(), and add them to the players inventory.
     
  4. Offline

    MrGeneralQ

    S
    So bassicly, you just want a plugin that add a pickage that will acutally break 3 blocks instead of 1?
     
  5. What the other guy said, it's a pick that breaks 3 blocks downwards, but only takes the time to break one
     
  6. Offline

    MrGeneralQ

    I'll add it to my to-do list. But I need more info. What Item should be used, what name you want for the item. Any lore?
     
  7. Thanks, it can be used on any block, except liquids and bedrock.
    No lore, but the name will just be JackHammer.
     
  8. Offline

    MrGeneralQ

    Last question, what Item? Which pickaxe?
     
  9. Diamond all the way
     
  10. Offline

    MrGeneralQ

    Alright. ! I'll do this.
    @Donald for Dictator : what does the toggle command?
     
    Last edited: Aug 11, 2016
  11. Toggles the jackhammer you're holding into a regular pick. If it's too hard, don't bother
     
  12. Offline

    MrGeneralQ

    Shouldn't be that hard. I am starting with your project now. Thank you for all the information. I'll keep you up to date.
     
  13. I literally love you so much, make sure it can be toggled back into a jackhammer again though.

    And I was thinking, would it break blocks in claimed land? I use protection stones, if that helps.
    let me know any possible ideas for work arounds
     
  14. Offline

    MrGeneralQ


    I'm afraid not. Maybe, since I will make the block break naturealy
    #RIP English :p
     
  15. Offline

    I Al Istannen

    @MrGeneralQ
    Use Bukkit#getPluginManager()#callEvent and call a BlockBreakEvent with the player and the block you want to break.
    Then listen to it on HIGHEST priority (but lower ones probably work too) and check if it is cancelled.
    If not, the user has permission to break a block there. Then you can use any method to break the block.
    If yes, the user doesn't have sufficient permission and you should NOT break the block.

    <EDIT>
    Or just do what bukkit does:
    Create it -> Call it -> Check if it is cancelled (use the same BlockBreakEvent for all of these)
    </EDIT>

    Additional benefit: @Lolmewn will not hate you, as the block break count in the Stats plugin will go up as it should :p
     
    Last edited: Aug 11, 2016
  16. Offline

    MrGeneralQ

    The mining part is working. starting now with the effect stuff.
     
  17. Offline

    Lolmewn

    @I Al Istannen This is so true - you wouldn't even know
    Like
    I'd be mining all day and get 1000 cobblestone and I type /stats and it's like "nop you totally mined 333.3 blocks today" (I'm a magician that way - I break 0.3 blocks sometimes)
     
    I Al Istannen likes this.
  18. Offline

    MrGeneralQ

    Still busy with the plugin. A little delay tough.
     
  19. Any update?
     
  20. Done.

    Downloadlink: https://www.dropbox.com/s/nnmtzzwt2ks82c5/Jackhammers.jar?dl=0

    Features:
    Commands:
    /jackhammer toggle - toggles from the enchanted, renamed jackhammer to a regular pickaxe and vice versa. Durability will be kept. Permission: jackhammer.toggle
    /jackhammer give [player] - gives you or a player a jackhammer. Permission: jackhammer.give
    /jh - just an alias for /jackhammer

    Tab completion: Press /jackhammer <tab> it will show give, toggle. Press /jackhammer give <tab> it will show the online player list.


    Breaks 3 blocks below it, if following conditions are met for each block:
    • block is not: bedrock, liquid or air
    • other (protection) plugin doesn't restrict breaking it
    Drops of the 3 blocks are directly added to the players inventory. If the inventory is full, the remaining drops are dropped as items.

    Durability decreases depending on the enchantment level and how many blocks get broken.

    Enchantments are the same as in your post and cannot be changed at the moment.

    Known issue:
    • Luck doesn't work on blocks below it because Bukkit's block.getDrops(item) method doesn't work with enchantments.
     
    Last edited: Sep 2, 2016
  21. It's all so cool, you put more effort in than I wanted, can't say thanks enough.

    What do you mean by that? Does it break protected regions or not?
    EDIT:
    Could you change efficiency to 5 and fortune to 3?
    All commands, tab and aliases work, thank you.
    Only small issue is that it doesn't quite work.
    If it's any use for a fix, none of the plugins like this have worked for me. I'll try make a free server.pro server really quick
    est it on there.
    https://sendvid.com/twdy9yzf

    EDIT 2:
    It doesnt work on the new server either.
    /jh toggle causes an internal error.
    On the second server, it says [Jackhammer] You have been given a jackhammer.
    On the real one it doesn't. I dont care about that, just wanted to let you know in case it was significant.
     
    Last edited: Sep 2, 2016
  22. It doesn't break protected regions.

    Yes, I may implement the functionality to edit the item.

    Please post the server log, the server version and the java version

    Here is a video of it working on my server (craftbukkit 1.10.2-R0.1, java 8): http://sendvid.com/58jf2v8v
     
    Last edited: Sep 3, 2016
  23. My bad, forgot to add the server version, I'm 1.8.8
     
  24. you forgot server log and java version

    and whats with this:
    You are supposed to put a plugin category, minecraft version and plugin name it.
     
    Last edited: Sep 3, 2016
  25. Help me out here? Where do I get the java version.
    Getting the server log may take a while. There's too much for pastebin or my computer to handle. Pastebin is limiting it, so I'll make a download for the lastest.log?
     
  26. reload the server, type the /jh toggle or /jh give command (which causes an error) and then provide a link for the latest.log

    If you have access to the command prompt (windows) or shell (linux) of where the server is hosted, type
    Code:
    java -version
    If you host it on an external provider ask the support
     
  27. Offline

    Rayzr522

    Or you could reboot the server, log on, then execute the command. That way he'll have everything he needs and it'll be nice n' short.

    EDIT: Dangit ninja'd
     
  28. its an external host, I'll get to you on the server log though. Thanks for being patient.
    http://pastebin.com/FTgW0zUm
    server log
     
  29. Wow you have many errors :eek: I found out it was a version incompability between 1.10.2 and 1.8... should be fixed in the next few hours and I make the item editable. If I get it working, luck enchantment will also work for the 3 blocks below it
     
  30. Great, I know lol, I need to go though my FTP and delete the 30 something unused plugins I have.
     
Thread Status:
Not open for further replies.

Share This Page