Native Minecraft Version:1.14Tested Minecraft Versions:
Let your players elect their mayor and king by a totally secret voting system
Concept
The mayor of a town can convoke an election and let the residents be a candidate and/or vote other people until it finishes. Also, the leader of a nation can convoke an election and let the mayors run with their cities to be the capital of the nation. Then who has the most votes is elected as mayor(or as the new capital), while the previous one keeps their town ranks.
Features
Commands and Permissions
Language
The messages are translatable, and you can edit the existing file (en_US.yml) or specify a new one in config.yml
Configuration files
The plugin has a simple config.yml file and allows you to translate EVERY message the players receive.
Spoiler: config.yml
Spoiler: en_US.yml
Developer API
The plugin has some methods to allow devs to hook it with their own plugins
Code (Java):
TownyElections.getElection(Player p) //Returns the election active (if exists) on the town of a player
TownyElections.addElection(TownElection e) //Adds your own election to the plugin
TownyElections.removeElection(TownElection e) //Removes an election
TownyElections.getTranslatedMessage(String key) //Returns a message from language file with a key
TownyElections.sendTownMessage(Town t, String msg) //Sends a message to all the online residents of a town
TownyElections.sendTownSubtitle(Town t, String msg) //Sends a subtitle to all the online residents of a town
TownyElections.removeRevolution(Revolution r) //Removes a revolution
TownyElections.getRevolution(Player p) //Returns a revolution
TownyElections.getInvite(UUID player) //Returns the revolution which invited the player
TownyElections.disbandRevolution(Revolution r) //Disbands a revolution
TownyElections.areRevolutionsEnabled() //Returns a boolean indicating if revolutions are enabled or not
TownyElections.getNationElection(Player p) //Returns the election active (if exists) on the nation of a player
TownyElections.addNationElection(NationElection e) //Adds your own election to the plugin
TownyElections.removeNationElection(NationElection e) //Removes an nation election
TownyElections.removeTownDecision(TownDecision e) //Removes a town decision
TownyElections.addTownDecision(NationElection e) //Adds your own decision to the plugin
TownyElections.getTownDecision(Player p) //Returns the decision active (if exists) on the town of a player
Support, metrics and test server
You can report bugs and contact with me in my server's Discord. Also, my server uses TownyElections and WarsForTowny, so you can join it to test it (it's a spanish server, so DM me if you need help).
bStats metrics here
- 1.8
- 1.9
- 1.10
- 1.11
- 1.12
- 1.13
- 1.14
Let your players elect their mayor and king by a totally secret voting system
Concept
The mayor of a town can convoke an election and let the residents be a candidate and/or vote other people until it finishes. Also, the leader of a nation can convoke an election and let the mayors run with their cities to be the capital of the nation. Then who has the most votes is elected as mayor(or as the new capital), while the previous one keeps their town ranks.
Features
- Convoke an election with a time limit
- Apply as a candidate
- Vote your favourite candidate
- Secret vote count until the end of the election!
- Elections can be stopped at any time
- Titles and sounds on important commands and events
- All the data is saved between sessions (and considers elapsed time)
- The entire plugin works with UUIDs
- The election data is secret and no one can know who you voted
- Spigot 1.10 or newer
- Java 8 or newer
- Towny (latest version recommended)
Commands and Permissions
- /telect - Shows help (townyelections.use)
- /telect info - Get the information of the plugin (townyelections.use)
- /telect [town/nation/towndecision] vote [candidate] - Vote for a candidate (townyelections.vote.[town/nation/towndecision])
- /telect [town/nation/towndecision] unvote - Remove your vote (townyelections.unvote.[town/nation/towndecision])
- /telect [town/nation/towndecision] convoke [duration in seconds] - Convoke an election on your town and alert the online residents (townyelections.convoke.[town/nation/towndecision])
- /telect [town/nation/towndecision] run - Run for mayor and be a candidate (townyelections.run.[town/nation])
- /telect [town/nation/towndecision] list - List the candidates of the active election (townyelections.list.[town/nation])
- /telect [town/nation/towndecision] stop - Stop the active election and choose a winner (townyelections.stop.[town/nation/t])
- /telect revolution start - Start a secret revolution
- /telect revolution invite [player] - Invite to a revolution (oly the leader) (townyelections.revolution)
- /telect revolution stop - Stop a revolution (only the leader) (townyelections.revolution)
- /telect revolution accept - Join a revolution (townyelections.revolution)
Language
The messages are translatable, and you can edit the existing file (en_US.yml) or specify a new one in config.yml
Configuration files
The plugin has a simple config.yml file and allows you to translate EVERY message the players receive.
Spoiler: config.yml
Spoiler: en_US.yml
Developer API
The plugin has some methods to allow devs to hook it with their own plugins
Code (Java):
TownyElections.getElection(Player p) //Returns the election active (if exists) on the town of a player
TownyElections.addElection(TownElection e) //Adds your own election to the plugin
TownyElections.removeElection(TownElection e) //Removes an election
TownyElections.getTranslatedMessage(String key) //Returns a message from language file with a key
TownyElections.sendTownMessage(Town t, String msg) //Sends a message to all the online residents of a town
TownyElections.sendTownSubtitle(Town t, String msg) //Sends a subtitle to all the online residents of a town
TownyElections.removeRevolution(Revolution r) //Removes a revolution
TownyElections.getRevolution(Player p) //Returns a revolution
TownyElections.getInvite(UUID player) //Returns the revolution which invited the player
TownyElections.disbandRevolution(Revolution r) //Disbands a revolution
TownyElections.areRevolutionsEnabled() //Returns a boolean indicating if revolutions are enabled or not
TownyElections.getNationElection(Player p) //Returns the election active (if exists) on the nation of a player
TownyElections.addNationElection(NationElection e) //Adds your own election to the plugin
TownyElections.removeNationElection(NationElection e) //Removes an nation election
TownyElections.removeTownDecision(TownDecision e) //Removes a town decision
TownyElections.addTownDecision(NationElection e) //Adds your own decision to the plugin
TownyElections.getTownDecision(Player p) //Returns the decision active (if exists) on the town of a player
Support, metrics and test server
You can report bugs and contact with me in my server's Discord. Also, my server uses TownyElections and WarsForTowny, so you can join it to test it (it's a spanish server, so DM me if you need help).
bStats metrics here