Giter VIP home page Giter VIP logo

bettervoting's Introduction

BetterVoting

BetterVoting is a PocketMine-MP plugin for letting players claim their rewards from voting for your server.

Why BetterVoting over others?

BetterVoting uses your server's api key which means you don't need to download any VRC files. BetterVoting is also an active project which means any issues can be resolved as quickly as possible.

How to configure BetterVoting?

When you first install BetterVoting, you will get a default config that looks like this:

# API Key from https://minecraftpocket-servers.com
api-key: ""
claim:
  # Message Variables:
  # {real-name} - The voter's full username
  # {display-name} - The voter's display name
  # & - Change message color
  # {x} - Voter's X coordinate
  # {floor-x} - Voter's X coordinate rounded
  # {y} - Voter's Y coordinate
  # {floor-y} - Voter's Y coordinate rounded
  # {z} - Voter's Z coordinate
  # {floor-z} - Voter's Z coordinate rounded
  broadcast: "{real-name} has voted for free rewards!" # Message to be broadcast when a player votes
  message: "Thanks for voting for our server" # Message to send to the player who voted
  items:
    # Items to be given to the player when they vote
    # Item format: "ItemName:Damage:ICount:CustomName:EnchantName:EnchantLevel"
    # Item IDs are not supported, use the item names instead
    # Replace spaces with "_" for item names
    # For no custom name/default item name, put "default"
    # First 4 fields are required, enchants are optional
    # You can have unlimited enchants, just follow the format "EnchantName:EnchantLevel:EnchantName:EnchantLevel" etc
    # There is also support for PiggyCustomEnchants, use same format as normal enchants
    - "diamond_sword:0:1:Vote Sword:sharpness:5:unbreaking:3"
    - "diamond_pickaxe:0:1:default:efficiency:2:driller:3"
  commands:
    # Commands to be executed by console when a player votes
    # Do not include "/" at the start of the command
    - "title {real-name} title &aVote"
    - "title {real-name} subtitle &7Thanks for voting!"
top-votes:
  title: "&aTop Votes This Month" # Message sent before displaying top votes
  display: 10 # Amount of top votes to dispay, can't be bigger than 500
  format: "&6{number}. &b{username}: &e{votes}" # Format of displaying top voters

The first thing you can see in the config is api-key. This is what BetterVoting uses to connect to the vote website and claim players' votes. To get your API key, go to Manage Your Servers on minecraftpocket-servers and paste in your API key.

Notice: As of now, BetterVoting only supports minecraftpocket-servers, and 1 server. Multi website support is a planned feature

Next in the config you will see claim information. The broadcast key, this is the message that get's broadcasted to the server when a player votes The message key is the message sent to the player after they vote

Variable Description
{real-name} The voter's full username
{display-name} The voter's display name
& Change message color
{x} Voter's X coordinate
{floor-x} Voter's X coordinate rounded
{y} Voter's Y coordinate
{floor-y} Voter's Y coordinate rounded
{z} Voter's Z coordinate
{floor-z} Voter's Z coordinate rounded

The items array is the items the player will be given for voting. If you follow the guidelines you shouldn't have any problems.

Notice: Issues regarding items not working will be closed, as it works fine if you follow the guidelines

The commands array is the commands to be executed by console when a player votes. Don't include the / in commands. You can use the message variables in commands aswell

The top-votes array is the information used for /vote top. title is the message sent to the player before sending the top voters. display is the number of voters to send to the player. format is the message sent to the player for every top voter.

bettervoting's People

Contributors

poggit-bot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.