Quantcast
Channel: Server Mods from Bukkit.org
Viewing all articles
Browse latest Browse all 2356

Elections

$
0
0

Elections!

The power to elect admins has been give to players. Using Vault, you can elect a new admin and give them all the permissions. Or you can chose a Master Builder and give them a fancy title. Allow players to chose the worst criminal, and strip them of all permissions and give them the prefix of "Criminal".

Config File

election-length: How long the voting period is in minutes. This changes how long players have to vote in an election.

Setting Up An Election

Elections are set up in the config file, and two examples are provided for you to look at. Im going to use the example of a master builder here. You can leave any field blank, or even not type it in, except for the title. All elections are placed below the "elections: " line in the config. elections: -You never want to remove this line, but you don't need to add it in for each MasterBuilder: -This is the election name, used internally, and how you refer to elections in your commands. These have to be unique names. office-time: 0 -This is how long the time in office lasts, in days. If it is less than or equal to 0, the office is never removed by the plugin. It can be removed through whatever permission plugin you are using. title: Master Builder -The prefix given to whomever wins the election. It does not overwrite the old prefix, but appends to it. max-candidates: 25 - How many players can run in a given election cycle. candidates-perm: election.run -What permission candidates need to have in order to run in the election. You cannot create a new permission here, but must use a command already in game. election-perks: [bukkit.command.gamemode] -an array of what permissions the winner gets, using a comma-seperated list in brackets.

Default Values

  • office-time: 1 day
  • title: no prefix
  • max-candidates: 10 players a cycle
  • candidates-perm: elections.run
  • election-perks: No added permissions

Commands

Vote

  • Vote for specified player in specfied election.
  • Usage: /vote <election name> <player>
  • permission: elections.vote

Run

  • Run as a candidate in specified election.
  • Usage: /run <election name>
  • permission: elections.run

StartVote

  • Starts the voting period for specified election.
  • usage: /startvote <election name>
  • permission: elections.votemaster

StartRun

  • Allows players to sign up to run in specified election.
  • usage: /startrun <election name>
  • permission: elections.votemaster

CancelElection

  • Cancels specified election without declaring a winner.
  • This DOES NOT prohibit the election from being started. You have to remove it from the config files and reload the plugin to do that.
  • usage: /cancelelection <election name>
  • permission: elections.cancel

Permissions

elections.vote

  • Allows players to vote in election, defaults to all players.

elections.run

  • Allows players to run in elections, defaults to all players.
  • This is the default permission to run in elections.

elections.votemaster

  • Allows players to start voting period and signup period for elections, defaults to OPs.

elections.cancel

  • Allows players to cancel elections without declaring a winner, defaults to console only.

To-Do List

  • Add commands to list all elections, create new elections, delete elections, reload config file.
  • Prohibit players from running if they are already in the office.
  • Find ways to make the plugin more efficient and use less ram.

Viewing all articles
Browse latest Browse all 2356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>