i saw this and it could be usefull! Plugin category: RPG Suggested name: blockthrow What I want: when i do /bt i activate block throwing mode. when in block throwing mode i can right-click a block around me. when i right-click in air after that, i throw the block in that direction. when there is a player or mob (or another block) in the line of the block, the block stops moving. the block stops after a set distance. (config file) Ideas for commands: /bt (activate block throwing mode) Ideas for permissions: bt.use (self-explaining, default op) When I'd like it by: ASAP when you do it haha
The direction part may not be that easy, and to shoot it in that direction, you need to use explosions. I don't know excatly how to do this, but I know how to do explosions and falling blocks.
the other thread (this) says a block has setvelocity now. i don't know much about it but shouldn't that work?
I've been experimenting with a plugin of mine and I can confirm that FallingBlock and setVelocity() works perfectly! This would be possible. You could even make a less smooth one with normal blocks!
It's possible. I'm new to coding bukkit plugins and I want to do a similar thing. The problem is you have to get the players direction and then turn that into x and z velocity's to get the right direction. (I think). Does anyone know how to do this? EDIT: I think I've found it use... .setvelocity(new Vector(player.getlocation().getdirection())); Or something similar
i have made a similar plugin, http://dev.bukkit.org/server-mods/throwblocks/ except the command is not a toggle and it wont stop on hitting a player/mob.
necrodoom pretty cool I just figured out exactly what I wanted and what I think creepycrafter4 wanted. Heres my code: Code: FallingBlock block = player.getLocation().getWorld() .spawnFallingBlock(location, Material.FIRE, (byte) 0); player.sendMessage("FALLING!"); Vector dir = location.getDirection(); block.setVelocity(dir.multiply(2)); I just tested it and it will fire a fire block (In this case) in the direction your looking at, it also still has its downwards momentum so it they will shoot in a parabolic arc (like an arrow)
could you make it so that it throws the block you right-clicked at after /bt (as described in first post)? as I am no programmer btw, it looks nice . a for you