Commands

Cannons provides a few commands to interact with the plugin. All commands can be accessed with the prefix '/cannons' in-game and a few admin commands via 'cannons' from the console. Writing '/cannons' in-game will display a short preview of other help commands.

Information commands

Starting with Cannons can be a little bit difficult, therefore I added a few commands for starters. Unfortunately these commands are from the first version and a little bit outdated. However you can change the displayed text in the localization file.

/cannons build

This command gives you a short introduction how to build a cannon. The text is configurable in the localisation file.

Accessibility: player
Permission: 'cannons.player.command'

/cannons fire

Since we have now built our cannon we would like to know how can we fire such a thing. This message is configurable via localisation file.

Accessibility: player
Permission: 'cannons.player.command'

/cannons adjust

You probably missed your first shoot. So read more how to aim with a cannon. Text is again adjustable via localisation file.

Accessibility: player
Permission: 'cannons.player.command'

/cannons commands

You don't know which command you can use for cannons? This will show you all commands you are allowed to use.

Accessibility: player
Permission: 'cannons.player.command'
Added: v2.3.4

Player commands

Most of the features in cannons are designed to work with items instead of commands. But for the sake of simplicity a few things are easier to do with commands.

/cannons imitate

Cannons will show a row of glass block in front of the cannon to illustrate the firing angle. If you don't like it you can disable it globally in the config or use this command to turn it off '/cannons imitate disable/enable'.

Accessibility: player
Permission: 'none'
Added: v2.2

/cannons buy

Allows the owner of a cannon to deconstruct the cannon. The player will receive a deconstruction refund. There is also a admin command to dismantle cannons if you are not the owner.

Accessibility: cannon owner
Permission: none
Added: v2.3

/cannons dismantle

Allows the owner of a cannon to deconstruct the cannon. The player will receive a deconstruction refund. There is also a admin command to dismantle cannons if you are not the owner.

Accessibility: cannon owner
Permission: 'cannons.player.dismantle' and permission.dismantle in cannon design
Added: v2.3

/cannons rename

When you build a new cannon the plugin will use the next free name for the cannon. Since 'Cannon11' does not look nice you have the possibility to change the name with '/cannons rename <OLD_NAME> <NEW_NAME>'

Accessibility: player
Permission: 'cannon.player.rename'
Added: v2.2

/cannons observer

Since the version v2.2 the cannonball can be fired at large distance and will not stop midair if it is too far away. Nevertheless it makes no sense to fire at a target if you can't see it. Therefore you can add yourself as observer for a cannon and you will see the pre-calculated impact (glow stone lamps) of the projectile for a loaded cannon. So this player can observe the target and instruct the gunner of the cannon.
Note: This option requires impact predictor which must be enabled in the config.

Accessibility: player
Permission: 'cannon.player.observer'
Added: v2.2

/cannons info

Very simple command that gives you the name and design of a cannon. Type in the command and right click on the cannon to get the information.
Note: This option requires impact predictor which must be enabled in the config. Rename command '/cannons get'.

Accessibility: player
Permission: 'cannon.player.info'
Added: v2.2.7

/cannons list

Since the amount of cannons can be limited for one player it might be interesting to know where these cannons are. This command is available in two different types. As player command which returns the list of your cannons, or as admin command. The admin command will list all available cannons on the server on default. Use '/cannons list NAME' to specify the command.
Note that the admin or console command will overwrite the player command.
Accessibility: player, admin and console
Permission: 'cannons.player.list' or 'cannons.admin.list'

/cannons target <mob|player|cannon> <true|false> <range>

Allows the owner of a sentry cannon to toggle or set to true/false the target entities. Just use the command and click on the cannon or if the range command is used all cannons in the given distance to the player will be change (limit 1000 blocks)

Accessibility: cannon owner
Permission: 'cannons.player.target'
Added: v2.4.3
Changed: v2.5.11 additional boolean and range

/cannons whitelist add <NAME>

Allows the owner of the cannon to add players to the whitelist of a cannon. Just use the command and click on the cannon.

Accessibility: cannon owner
Permission: 'cannons.player.list' or 'cannons.admin.list'
Added: v2.3.4

/cannons whitelist remove <NAME>

Allows the owner of the cannon to remove players from the whitelist of a cannon. Just use the command and click on the cannon.

Accessibility: cannon owner
Permission: 'cannons.player.list' or 'cannons.admin.list'
Added: v2.3.4

/cannons reset

You built too many cannons and no idea where they are? This command will remove all your cannons from the database. There is also a command available for admins to remove cannons of other players available ('/cannons reset NAME').
Note: '/cannons reset' will not work for admin to prevent unintended reset of his cannons. Admins have to use '/cannons reset MYNAME' to remove their cannons. 

Accessibility: player, admin and console
Permission:' cannons.player.reset' or 'cannons.admin.reset'

/cannons claim

Claim cannons in the surrounding. Useful for cannons copied with a other plugin (e.g.: worldedit). The claim distance can be set in the config.yml via 'general/claimEdgeLength: 60'.

Accessibility: player
Permission:' cannons.player.claim'
Added: v2.5.2

 

 

Admin commands

Cannons provides a few commands which should make life easier for server admins.

/cannons reload

If you update the config or design files it is necessary to reload the plugin. This can be done by reloading the server or with the command '/cannons reload'.
Note: Your cannons will be saved in the database before reloading. Nothing is lost during reload.

Accessibility: admin and console
Permission: 'cannons.admin.reload'

/cannons save

The autosave interval for the database is 5 minutes. However you can also perform '/cannons save' to save the database.

Accessibility: admin and console
Permission: 'cannons.admin.reload'

/cannons load

The plugin will reload from the database when it starts up. '/cannons load' will load all information from the database while the plugin is running.

Accessibility: admin and console
Permission: 'cannons.admin.reload'

/cannons permissions

Setting up a permissions system can be a difficult task. To make your life as server admin a little bit easier I present the permissions command which will display all default permissions of Cannons for a given player (additional argument '/cannons permissions <NAME>') or for the command sender.
Note: This will not display modified permissions like changes in cannon design

Accessibility: admin and console
Permission: 'cannons.admin.permissions'
Added: v2.2.3

/cannons dismantle

Allows an admin to deconstruct any cannon, even if the admin is not the owner. The player will receive deconstruction refund.

Accessibility: admin
Permission: 'cannons.admin.dismantle'
Added: v2.3

/cannons create <design>

Allows an admin create a cannon just by its design file name (filename without extension). Use '/cannons create classic' to create the cannon design called classic.yml.
Note: The command will overwrite existing blocks with the cannon. Please keep this in mind before placing your cannon.

Accessibility: admin
Permission: 'cannons.admin.create'
Added: v2.3.8

/cannons give <projectile> {amount}

Allows an admin to give projectiles to himself with the projectile file name (filename without extension). Use '/cannons give cobblestone 64' to create a stack of cobblestone.yml projectiles.

Accessibility: admin
Permission: 'cannons.admin.give'
Added: v2.4.3 

/cannons blockdata

Allows an admin to display the blockdata of a block clicked at. Very helpful while designing new cannons.

Accessibility: admin
Permission: 'cannons.admin.blockdata'
Added: v2.5.0