Cannons
What can it do?
Cannons is a highly configurable plugin which allows you to fire block build cannons. It is possible to aim and load different amounts of gunpowder to hit targets at different ranges. The power of redstone makes it possible to set the gun to auto load and activate the rapid fire mode. Choose your projectile from a broad spectrum of cannonballs and smash the enemy.
With Cannons 2.0 you are also able to design your own cannons using .schematic files and give each cannon their own settings, as well as different types of projectiles.

Features
- Build a cannon out blocks
- Design your own cannon and save it as .schematic
- Design and fire different projectiles to smash your enemy
- Use redstone to fire guns from distance
- Rapid fire with auto-load possible
- Destroyed blocks can be restored with CreeperHeal (if 'custom' option is true)
- Cannons will stay load and aligned due to the database
- Movement plugins (e.g. Movecraft) are supported if a cannon has a sign to store a tag
- API for ships plugins (e.g. iSails) to use cannons on ships without signs.
Videos
by ServerMiner
by wickedbrother
Out-dated showcase 1
Out-dated showcase 2
Recommended plugins
- ObsidianDestroyer
- WorldGuard (flag protection: '/region flag NAME other-explosion deny')
- CreeperHeal (set 'custom explosion' for your world to repair cannon damage)
Installation
- Install WorldEdit first (don't forget this)
- Copy the cannons.jar into your Bukkit's "plugins" directory, then run the server.
Dependencies
This plugin requires:
Metrics
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version If you wish to disable this feature (/me cries), you can do so by opt-ing out, which you can do in the config file under /plugins/PluginMetrics/
Information for Cannons 2.x
Tutorial:
Additional information:
Cannon Designs
- Share your designs with other people: Cannon Designs
Known Bugs
- The cannon ball (snowball) becomes invisible after 60 blocks but hits the target.
- Voxelsniper will delete Buttons/Torches when you load the gun (be careful when you click the barrel)
Need Help?
Credits
- Raser4000
- DreTax
- JlJlJl
- and many more

-
View User Profile
-
Send Message
Posted Jun 27, 2012@AlexZeroHour Update factions to 1.7.x or set 'use protection hook: false'
-
View User Profile
-
Send Message
Posted Jun 27, 2012I really like this plugin :). But the cannonballs wont explode at me, the server gives this:
Can u help please :(?
-
View User Profile
-
Send Message
Posted Jun 27, 2012@jhs232 If MCTowns sets the 'tnt' flag in the worldguard region for created town it should work. I have contacted the developer to discuss this.
-
View User Profile
-
Send Message
Posted Jun 27, 2012Could you make it so that it cant destroy blocks protected by WorldGuard and plugins that uses WorldGuard to protect blocks, such as MCTowns?
Link for MCTowns:
http://dev.bukkit.org/server-mods/mctowns
-
View User Profile
-
Send Message
Posted Jun 26, 2012@pkt77 It is already on github and I have updated it now.
https://github.com/DerPavlov/Cannons
-
View User Profile
-
Send Message
Posted Jun 26, 2012Can you post the source code to github? pls
-
View User Profile
-
Send Message
Posted Jun 24, 2012After several hours testing we found the problem with the player damage and fixed a few other bugs. Testing in a flat world is not the best solution. For testing reasons the glass projectile does now 5000 damage and I really like to sweep the world from mobs :)
-
View User Profile
-
Send Message
Posted Jun 24, 2012@Custergrant Can you try a penetration of -1? If tested a few shots with the cannon but getting killed makes no fun. I think the problem is that the glass projectile sometimes breaks a block and then you can't damage player because the wall blocks it. Can I visit your testing range. It think that would speed the testing up.
@MizunoJames I am going to implement a wiring of the button.
-
View User Profile
-
Send Message
Posted Jun 24, 2012I've gone through CreateExplosion.java, and everything seems to be functional. I didn't catch any bugs, at least. Your vector math looked correct, and yes, I tried penetration of 0 and >0. I also increased the damage of glass such that standing 15 blocks from the impact site should still take at least a heart away, and I still can't damage a player without it being a direct hit.
-
View User Profile
-
Send Message
Posted Jun 24, 2012@DerPavlov
Prefabibly something on the lines of either power going into the cannon itself (the barrel) or into the rear button (the one under the torch) would cause it to fire, mostly how a dispenser would work mostly. Only work around I can think of which I've not tried yet is using a glowstone lamp under the cannon itself and a block next to that which gets the power to it and the lamp carries the power into the cannon above it, tho I'm not sure if that would work for cannon batteries which is what I would prefer.
-
View User Profile
-
Send Message
Posted Jun 24, 2012@MizunoJames The torch under the barrel uses up much space, I know. I have a similar request to reduce the height of the cannon by placing the torch on the end instead of the button. Do you have a picture how you want to wire it. Maybe there is an easy way to implement it. I really like the idea of ships with guns :) . In combination with movecraft this will be really awesome. Hopefully Striker can finish the API soon.
-
View User Profile
-
Send Message
Posted Jun 24, 2012first of all, great mod, currently trying it out, tho have wondered, do the cannons only pick up redstone signals only from under them? as have tried sending inputs from the sides of the cannons yet they don't seem to notice.
Mostly wondering cause I've got a replica of HMS Victory (which I still need to finish parts of) which I'd like to arm and theres not much headroom on the gundecks to raise the cannons and give the gunners a line of view.
Cheers again for this mod.
-
View User Profile
-
Send Message
Posted Jun 24, 2012@Custergrant I am going to visit my test range. Maybe this hiding behind wall makes problems. Do your use 'penetration' for your projectile?
-
View User Profile
-
Send Message
Posted Jun 23, 2012Right, I figured that out (from the code and testing), but about 90% of the time, even if the player is within 4 blocks, he/she still only receives one half heart or less.
-
View User Profile
-
Send Message
Posted Jun 23, 2012@Custergrant Ok. The player damage is calculated this way. If the player is in a 4 block radius he will receive the full playerdamage of the projectile (this is calculated in half hearts).So playerdamage of 20 will kill any player.
Outside this area it will decrease with the squared radius. So if you are 5 blocks away you will only receive 20/(5^2 - 15) = 2 = 1 heart.
There is also a small chance that you make a crit which doubles the damage.
-
View User Profile
-
Send Message
Posted Jun 23, 2012No, I turned all protections off (to ensure incompatibilities weren't existent). There is an impact explosion, and I can turn the Explosion Power to 0 to take care of block damage. My issue is the player damage. Sometimes, they receive 1/2 the Player Damage value, but other times, they will only lose half a heart or none at all, even if they're less than 4 blocks away from the impact site.
-
View User Profile
-
Send Message
Posted Jun 23, 2012@Custergrant If there is no impact explosion than a protection plugin cancels it (like factions 1.6.x, towny,...). Check your log if any error pops up after firing. I believe the half heart damage will also vanish if the player wears a helmet. Because its the damage from the gun noise not the impact.
If you are using factions update it to 1.7.x. Also setting 'use protection hook: false' will probably fix the problem.
Players which are 4 block away from the impact will receive lower damage because the damage around the impact decreases rapidly. You can try to increase the player damage for the projectile. This will make it more deadly. Also there if the player is standing behind a wall this will protect him from damage.
-
View User Profile
-
Send Message
Posted Jun 23, 2012Looking at the explosion functions, players standing <=4 blocks away from the impact location should receive the full location, but when testing, this is not the case. Only if a player is level with the cannon will they receive the damage. Furthermore, most hits only cause half a heart of damage. Any ideas?
-
View User Profile
-
Send Message
Posted Jun 22, 2012@DerPavlov
Ty very much!
-
View User Profile
-
Send Message
Posted Jun 22, 2012@laclongquan Load the cannon with gunpowder and a projectile. Redstonetorch underneath and a chest next to the barrel block. Load the chest with gunpowder and projectiles.
https://dl.dropbox.com/u/16404245/2012-05-17_19.46.26.png