help/Arguments
Arguments
Arguments are very important, and also a bit tricky to explain.
An argument in programming just means something that is not always the same value. When you do a /vote kick RabidCrab, RabidCrab is an argument, because it could be /vote kick Yeti, /vote kick Wookiee, etc.
The Vote plugin accepts any number of arguments for custom made commands, and they're referenced by using this format, where X is the argument number: [%X]. For my plugin, that means /vote kick RabidCrab looks like - vote kick [%0] in the config.yml. I highly recommend taking a look at the rundown for all the options available for a custom command.
Arguments always start at 0. So if you have one argument, it would be [%0]. If you had two, they would be [%0] and [%1].
One other feature of the Vote plugin, is that the last argument available is the starter of the votes name. So if I started a /vote kick Yeti, [%0] = Yeti and [%1] = RabidCrab. This applies to all votes. So if there's 0 arguments, like the day vote, [%0] will be the starter of the vote. If you have 2 arguments, [%0] and [%1] will be the arguments, and [%2] will be the vote starter.
Comments