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 Dec 17, 2012@Crysillion dropbox, mediafire
-
View User Profile
-
Send Message
Posted Dec 17, 2012Sure. Do you know of an upload site I could use?
-
View User Profile
-
Send Message
Posted Dec 17, 2012@Crysillion Can you send me a .zip of your server files including plugins. The world is not required.
-
View User Profile
-
Send Message
Posted Dec 17, 2012As well, with this setting, where-ever a cannoball hits leaves a patch of snow on the ground. Nothing happening.
-
View User Profile
-
Send Message
Posted Dec 17, 2012By setting "force tnt event" back to true, Cannons no longer work in general. The projectile is launched, an explosion animation and sound is triggered, but ultimately no block is destroyed.
in WG, all kinds of explosions are not blocked. Creeper explosions break blocks, regular TNT breaks blocks, this is all tested and true. However, cannon projectiles do not break blocks anywhere.
-
View User Profile
-
Send Message
Posted Dec 17, 2012@Crysillion Worldguard only checks tnt explosion events. Everything else will destroy regions, which is kind of bad in my opinion. For this I made this force tnt event to protect Worldguard. Best you turn 'force tnt event' on and check your worldguard settings. For me denying/allowing the 'tnt' flag worked best.
-
View User Profile
-
Send Message
Posted Dec 17, 2012This is fixed by turning "force tnt event" from true to false. However, now cannon projectiles will explode and damage WorldGuard regions, despite having TNT: deny and creeper-explosion: deny set.
Seems like a very serious problem.
-
View User Profile
-
Send Message
Posted Dec 17, 2012@Crysillion Please check if you have downloaded the Bukkit R0.3 version. If you use the R0.2 version use Cannons R0.2. There are two available. Cannons forces now a TNT event, so if you can destroy blocks with TNT it works also with cannons. Can be disabled by setting 'force tnt event: false'. You mean you can't load tnt or whats the reason?
-
View User Profile
-
Send Message
Posted Dec 17, 2012Using your R.03 build, TNT does not break terrain. TNT in and of itself does break terrain, but TNT as a projectile in Cannons does not work at all.
-
View User Profile
-
Send Message
Posted Dec 17, 2012@allix8 No problem
-
View User Profile
-
Send Message
Posted Dec 17, 2012@DerPavlov
great thnx R0.3 solved problem!
i use R0.2 the last - I think better )))
-
View User Profile
-
Send Message
Posted Dec 17, 2012@allix8 Have you checked both versions?
-
View User Profile
-
Send Message
Posted Dec 17, 2012@DerPavlov
shoots exactly perpendicular to the gun barrel
link http://ci.ecocitycraft.com/job/Spigot/321/
-
View User Profile
-
Send Message
Posted Dec 17, 2012@allix8 30 degree or 90 degree? There are two different versions, one for R0.3 and one for R0.2. If non is working give me a link to your server version and I am going to check it.
-
View User Profile
-
Send Message
Posted Dec 17, 2012A default gun shoots at angles of 30 degrees to the left. And I can not get it to shoot straight.
Spigot craftbukkit-1.4.5-R0.3-321
-
View User Profile
-
Send Message
Posted Dec 16, 2012On the note of a web interface, having the MySQL support is more then enough. Any web programmer should be able to create their own custom interface to fit their needs with minimal effort since MySQL is a natural part of any dynamic web language.
Personally I will be using PHP to create one if you get this running and am willing to put up the source for others to use and/or use it as a guideline to make their own custom one from.
^_^
-
View User Profile
-
Send Message
Posted Dec 16, 2012If you use basic rules that all cannons have to follow you could set it up as a cuboid set up.
So say that the cannon has these settings that are optional :
isCannon : true/false isMortar: true/false
This would tell if the cannon was facing up or facing a direction, then we add the basic settings that are needed to define a cannon in the file such as :
cannonMaxLength : X cannonMaxwidth : X cannonMaxHeight: X cannonBodyBlock: BLOCK fuseBlock : BLOCK
This would allow scalability to thickness of the cannon and show where the core is that the program needs to look for to make sure a cannon of type X is the correct schematic. You would need to have the fuse of course be on one end and not the other so I would have it check the length one direction over the other, of course checking that the longest travel distance (ex 3x3x8 cannon would check and see one direction was 8 in distance, so this is the cannons front to back direction) then make sure that it is farther from fuse to tip then fuse to barrel to define exact direction. Of course this would not be an issue with the isMortar setting as it will always fire up we would just need to look for the nearest airblock on the y-axis.
Now if we used a sign that has to be placed on the cannon to trigger the event of checking the schematic, say on line 2 and 3 we have them put the following text :
[CANNON] [SCHEMATIC]
then we do not have to tie down the listener looking for the fuse block and we can check that there is indeed a cannon there of X type schematic. If the schematic is not followed properly it could either send a fail message or what I think would be cool have a backfire event be used like if you had misfired a gun.
Now because we used a sign to define the cannon we could allow a restone circuit going to the sign cause a block update on it and see its a sign, look to see if our text formatting is on said sign, and reinitialize the cannon defining event, because it updates the block we could have it silently check the schematic again so no "You've made a cannon" text would show and as its redefining on redstone update it would be viable on movement such as with movecraft or worldedit etc.
If we have the sign check if the cannon was previously defined before we could make that redstone update also fire said cannon if there was previously ammo loaded into the barrel making it seem to the user that you have to "prime" the barrel when its moved which is fairly realistic (and they don't really see whats going on in the background) and then fire the cannon with a second pulse (since after the first one we check for and redefine the cannon if it was moved).
Since our core barrel was previously defined with a height width and length with a direction to be fired we can now design around the cannon and its said design to make it feel how we like, and because our sign is now redstone controlled we can control where the trigger and what trigger type we have is!
From here we can add advanced effects from a said cannon type that are not tied to its actual design, here are some ideas :
cannonKickBack cannonKickBackEffect1 cannonKickBackEffect2....... and so on cannonCoolDown cannonMaxGunpowder cannonMinGunpowder cannonMaxFireSpeed (possibly the scale at which gunpowder multiplies the ammo types fire speed)
etc etc etc.
Hope this gives you some ideas! Ambe
-
View User Profile
-
Send Message
Posted Dec 16, 2012@ambedrake I like this idea. I think the .yml will stay for first time configuration and user without database. But you can force the database to overwrite the file, as a type of backup.
At the moment I don't know how to implement the cannon design feature. Basically you have to select the blocks of a cannon, the blocks to fire the cannon and the location and direction the projectile leaves the barrel. I had a admin command in mind where you select these blocks and store it to a separate .yml file, but storing to a database makes no additional effort. So you can alter the config for cannons with a simple web interface. (I have no idea how to do implement such a thing) . Give me some time to implement this, but consider it as done :D
-
View User Profile
-
Send Message
Posted Dec 16, 2012Sorry if I was not clear enough I kind of went on a tangent.
The idea was to do away with the yml file all together, storing your plugins settings into the database as a choice instead of using flat files (yml). Since the plugin only needs to read the settings once and store them in memory it should make little to no difference in speed switching to a database to store settings like this.
The idea of different gun/ammo types was that earlier you were thinking of allowing custom cannon configuration. You can configure a cannon type and have the ammo that is allowed to go into that type of cannon have different properties based on the cannon type that fired it.
Example : Cannon A is a basic cannon, TNT is an ammo it uses, TNT will act like a cannon ball when fired from this type of cannon.
Cannon B is a mortar, TNT is also an ammo it uses, TNT will act as an explosive that rains fire down on its target when fired.
Basically allow people to make their own configuration to define new types of cannons, then apply certain effects to the cannons to make them custom. From there have an valid ammo list that can be configured for each cannon type and how they will behave when fired from said cannon type.
If this was set up in this way, and the cannon settings defined in a database instead of using a yml file as is explained above, admins could customize their cannons or define whole new cannons even through their website and then just run a reload config command in game or on their console to have the plugin check for the new settings in the database.
As such they could also set up a PHP or other type of script on their website to show the schematic for the new cannon type the chose to make so that players can build it with out having to manually write a post or tutorial on their custom cannon. The script could include the ammo properties and valid ammo for that cannon type as well.
I hope this is a bit more clear on the idea, if not let me know, Ambe
-
View User Profile
-
Send Message
Posted Dec 16, 2012@ambedrake The database thing is planed since very very long time. But I never had time to make it. If I understand you right, the player can buy ammo types per web interface? You can already give specific projectiles to a player per permissions.
Personally I believe I can't write all these information in the database since it would be inconsistent with the .yml file. But I can provide an API where you can change these and store the information to the .yml. You basically need a second plugin that copies these information to your web interface. The Secon plugin can do such thinks when it is finished. But I think that it is not that complicated to implement.