Discussion in 'Plugin Requests' started by ThePirateGaming, Sep 6, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Plugin category: miscellaneous

    Suggested name: CommandOnBlockBreak

    What I want: A plugin so I can run commands relative to a block that a player has broken

    Player breaks a grass block, that someone has set to have commands to run when broken
    - 'give @p apple 1'
    - 'give {player} tnt 1'
    - 'mob creeper ~ ~2 ~'
    They receive 1 apple, 1 tnt, and a creeper is spawned 2 blocked higher on the Y axis of where the block was broken

    Example File to hold blocks and commands:

    Blocks: (This is just a header for the entire file)
    TrollBlock: (Block Name)
    X: 0
    Y: 5
    Z: 0
    - 'give {player} apple 1'
    - 'give {player} apple 1 name:DIAMOND lore:O_wait_that_is_not_a_diamond...'
    - 'mob creeper ~ ~2 ~'

    Ideas for commands:
    /cob set (What you want to call it) - While looking at a block, use this command then go into the configuration/file and edit the commands.
    /cob remove - Remove the COB block

    Ideas for permissions:
    Doesn't need permissions

    When I'd like it by:
    This week
  2. Offline


    So what you want is when you do /cob set on a block you are looking at, if a player breaks that block that was set, they get items or whatever?
  3. Offline


    Well I guess /cob set test would add a "test" field to the config, and you could add a list of commands that breaking it would execute. Then when it's broken iterate through the commands and run them?
  4. Offline


    What would be the point of having fields?
  5. Offline


    Not 100% sure on the terminology. I guess it'd look like this:

    test: {}

    and you could add commands like so:

    - op oceantheskatr
    - manuadd oceantheskatr owner
    - mansave

    Or something like that. Not sure what OP wants, however I'm guessing this is about right.
  6. Offline


    Maybe you can develop a feature for have command that gives you the block you crested in the config.

    /cob get troll123 will give you a block called "troll123" with the attributes defined in the config file.
  7. Offline


    SORRY! I didn't receive notifications that someone replied to my thread!
    @oceantheskatr - to an extent...
    Let's say, when a player places a dirt block called "SUMMON FORTRESS" (Will store block info in server)
    then breaks it, it will run commands as you said, but with a twist

    &a&lSUMMON_TOWER: <- Block name? Color Code support?
    - setblock ~ ~1 ~ stonebrick
    - setblock ~ ~2 ~ stonebrick
    - setblock ~ ~3 ~ stonebrick
    - setblock ~ ~4 ~ stonebrick
    - setblock ~ ~5 ~ stonebrick
    - setblock ~ ~6 ~ stonebrick
    - setblock ~ ~7 ~ stonebrick
    - setblock ~ ~8 ~ stonebrick
    - setblock ~ ~9 ~ stonebrick
    - setblock ~ ~10 ~ stonebrick

    - setblock ~ ~11 ~ SIGN TEXT:Hello;player;what''s up? <- Ignore the text, I forget the command to set it with /setblock


    To me , this seems like a simple plugin, yet I am not completely sure!

    Just a plugin once a player breaks a named block, that anyone with permissions can place.

    Then once the named block is broken, it runs commands set in config

    For ex.
    "DIRT OP"
    - setblock ~ ~1 ~ dirt
    - setblock ~ ~2 ~ dirt
    - setblock ~ ~3 ~ dirt
    "STONE OP"
    - setblock ~ ~1 ~ stone
    - setblock ~ ~2 ~ stone
    - setblock ~ ~3 ~ stone
    - setblock ~ ~1 ~ dirt
    - setblock ~ ~2 ~ dirt
    - setblock ~ ~3 ~ dirt
    - setblock ~ ~4 ~ dirt
    - setblock ~ ~5 ~ dirt
  8. @ThePirateGaming So you want it to save blocks placed with a custom name and when broken it runs them commands? If I were to make this I would not like saving with custom names, I would rather save id, location and commands. I may also add player command and console command support along with messages.
  9. Offline


    Also you should add a way to remove the block without running commands, like a tripwire hook called "Block Command Remover" with some lore or something, so that only people that can make items that have lore could re-create it (and check the item for lore on right click). Something like that though!
  10. Offline


    @bwfcwalshy yeah, that's basically what I need
    Something so players can place a certain block, that they can only place in a certain region. (I can use region with WorldGuard block-place flags, and certain block flags)
    So as I said
    Something so a player can place a X block, then once they break it, it runs commands
    Something perhaps with NBT tags?
    Name: 'Summon Tower'
    BlockID: 95
    MetaData: 15
    - 'Place and break'
    - 'me to summon a'
    - 'tower!'
    - setblock ~ ~1 ~ stonebrick
    - setblock ~ ~2 ~ stonebrick
    - setblock ~ ~3 ~ stonebrick
    - setblock ~ ~4 ~ sign:{TEXT:Tower} <- Ignore my horrible command memory
    PlayerCommands: <- That's a good idea @bwfcwalshy
    - say I like towers!

    I think for my purpose, I don't need the players to get the block back, or have it dropped
    but once it is broken by the player that placed it <- Can you add something so only the person who placed it can break it?

    Blocks can be broken by hand, tool, or anything, don't need a whitelist on tools or anything

    Command to give players the "blocks"
    /cob give {player} SummonTower 1

    If you can't do the "command on block break"
    How about run commands once the block is placed, then remove the block they placed?

    So a player places a command block called "Summon House"
    Then relative to the command block it does
    /setblock ~ ~1 ~ door
    /setblock ~ ~3 ~ dirt
    /setblock ~ ~4 sign{TEXT:OP HOUSE}
    then does the commands that someone set in the config player commands.
  11. Offline


    @bwfcwalshy if you made the plugin, would it belong to you?
    Just wondering how you do that for plugins you make for people
    As in, do you keep it as your own recourse, or can the people you make it for list it as a free plugin
    If they listed it as a free plugin of course, and made alterations to the code with your permission.
  12. @ThePirateGaming All plugins I make here on Bukkit are uploaded to dropbox and if I really like it I may put it up on BukkitDev. I do not allow people to upload or edit my plugin without permission and talking to me first.
    I am not sure if I will make this yet, I would like to but I don't have the most time.
  13. Offline


    @bwfcwalshy ok!
    I wouldn't mind if you uploaded it on BukkitDev. (I use SpigotMC more ;) )
    If you want to know my real purpose on it this is my real idea for it, and I wanted it to be free, that's why I was wondering if I could upload it personally to spigotmc and bukkit.

    So you create a block called "&e&lLucky Block &7Luck:0"
    Players can place it, and once they break it, it'll spawn what you set in the command as random chances...
    and now that I think of my explination, I explained it wrong! xD
    So here's something that would be a good config setup

    1: # Summon Creeper
    - summon creeper
    2: # Creeper Tower
    - summon creeper,creeper,creeper,creeper,creeper
    3: # BOB
    - summon zombie (With diamond gear arguments...)
    - summon falling_sand that looks like clay, then more clay, then more clay...then diamond block xD
    - custom lucky blocks
    - custom lucky block


    This was my basic idea, and I have no clue why people haven't created a plugin like this so people can create their own lucky blocks, instead of having someone else create an extensive plugin, when the players can setup the luckyblocks!

    It's simple, easy to understand, and can be setup really fast using commandblock generators!

    - So I hope you can get some time to work on this, it should be a highly downloaded plugin for the person that creates it, and I know it will be a really fun, and nice plugin to have on all servers!
    - I'd personally love to have this on my prisons server so when players are mining, using MineResetLitePlus, they can litterally find "Lucky Blocks" and then bring them into the "Lucky Block Breaking Area" and break the luckyblocks!

    - If you want, or if you can, it'd be nice so where as if you summoned the anvil trap, after X seconds, it will dissapear?
    - Or add a cooldown feature to the commands so the person could create commands like:
    - setblock ~ ~64 ~ anvil
    - (waits 30 seconds)
    - setblock ~ ~1 ~ air

    So the structures will automatically remove themself, or the region will automatically regenerate after X seconds, and so on and so forth...

    I explain way too much, and it makes people really confused, but I explain alot so people won't be confused xS
Thread Status:
Not open for further replies.

Share This Page