Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function increaseVotes() {
- var voteFile = new java.io.File(plugin.getDataFolder(), "vote-counts");
- var config = org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(voteFile);
- var count = config.getInt(target + ".votes");
- count++;
- config.set(target + ".votes", count);
- config.save(voteFile);
- }
- function getVoteCount() {
- var voteFile = new java.io.File(plugin.getDataFolder(), "vote-counts");
- var config = org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(voteFile);
- return config.getInt(target + ".votes");
- }
- increaseVotes();
- if (getVoteCount() == 1) {
- command("eco give %target% 100")
- } else if (getVoteCount() == 4) {
- command("manuadd %target% mayor world")
- } else if (getVoteCount() == 20) {
- command("manuadd %target% governor world")
- } else if (getVoteCount() == 40) {
- command("manuadd %target% senator world")
- } else if (getVoteCount() == 60) {
- command("manuadd %target% vicepresident world")
- } else if (getVoteCount() == 80) {
- command("manuadd %target% president world")
- } else if (getVoteCount() == 100) {
- command("manuadd %target% worldleader world")
- } else if (getVoteCount() == 120) {
- command("manuadd %target% realmruler world")
- } else if (getVoteCount() == 140) {
- command("manuadd %target% demigod world")
- } else if (getVoteCount() == 240) {
- command("manuadd %target% legend world")
- }
Advertisement
Add Comment
Please, Sign In to add comment