MultiVoteListener

MultiVoteListener is Spigot 1.11 ready

MultiVoteListener is a leightweight listener for Votifier that has been inspired by the Simple Vote Listener. However it adds a couple of features that are required on a server I am working on as an Admin.

The current version of MultiVoteListener comes with the following features:

  • Handle multiple vote services independently
  • Vault support
  • PlayerPoints support
  • Run commands through console upon vote
  • Run commands through console if player who voted is online
  • Customizable messages & broadcasts
  • Color code support for messages
  • Variables in commands & messages
  • ClickEvent on broadcast message - opens vote (or any other valid) URL on player click (This feature is only supported when running a Spigot Server)
  • Block unknown player votes
  • Enable / disable selected services
  • Default service (if no configured service matches an incoming vote)

Installation

Requires: Votifier 1.9, Vault 1.5
Can hook into: PlayerPoints

  • Deploy the jar file into the plugins folder
  • (Re)start your server
  • Modify config according to your needs
  • Run /mvote reload

Configuration

Once installed you can modify the config.yml to fit your needs. The config file contains comments explaining each of the options provided.

Sample configuration file:

 # MultiVoteListener configuration file
 #
 # Placeholders (will be replaced in messages & commands)
 # ------------------------------------------------------
 # %name%, %service%, %amount%

 allow_fake_names: true
 message_prefix: '&6[&4MultiVoteListener&6] '

 messages:

      player_vote_success: '&CDanke für deinen Vote auf %service%.'
      player_money_reward: '&ADir wurden %amount% Coins gutgeschrieben.'
      player_points_reward: '&ADu hast %amount% Votepoint(s) erhalten.'
      player_heal_reward: '&ADu wurdest geheilt.'
      broadcast_vote\_success: '&C%name% hat auf %service% gevotet.'
      no_vault_warning: 'Vault is not running. Money will not be credited to user.'
      no_playerpoints_warning: 'PlayerPoints is not running. Vote points will not be credited.'

 services:
    default:
      name: 'multivote_default'
      url: 'http://www.asgarioth.de'
      enabled: true
      money: 150
      points: 1
      heal: true
      online_commands: []
      offline_commands: []
 # service0:
      # name: 'someservice'
      # url: 'https://someurl'
      # enabled: true
      # money: 1
      # points: 1
      # heal: true
      # online_commands:
      # - 'bc someservice vote'
      # - 'bc 2nd command'
      # offline_commands: []

Commands

There are some ingame commands provided for your convenience (require either OP or appropriate permission):

  • /mvote reload - will attempt to reload the config.yml from disk
  • /mvote services - Outputs a list of configured services and status (active/disabled)
  • /mvote status - Shows status of plugin hooks (Vault/PlayerPoints)
  • /mvote help - This list

Permissions

  • mvote.admin - Grant access to /mvote commands

Troubleshooting

A vote is not handled. Nothing actually happens.

  • Check if Votifier receives the vote. I recommend to use the FlatfileVoteListener.class with Votifier to have a vote log at hand.
  • Check if you have properly configured the service in the config.yml. The name must match the servicename provided by the vote site.
  • Check if the appropriate service is enabled in config.yml (enabled: true). If you have not chosen to use a specific service configuration check if the default service is properly configured.

Money and/or PlayerPoints rewards are not credited to user.

  • Check if hooks are active by issuing /mvote status. It should indicate „Yes“ for Vault and/or PlayerPoints. If not something went wrong during server start. This might be either caused by those plugins or due to an error while hooking into their API. Please review the server log.

Online/offline commands are not executed

  • Check if the commands you specified in the config.yml file are suitable to be run by console. Many plugins provide commands that are ingame only.

Need help? Have a feature request?

Feel free to contact me via email, PN, forum, etc,. Since the plugin is running on my server as well I am very motivated to get errors fixed immediatelly once they come to my attention.

Implementation of new features depend on how complex, popular and challenging such a request is. In most cases I will have a look into it and try to provide the requested feature.

Sourcecode

This plugin is release under the terms of GPL v3.0.
You can finde the sourcecode at Github.


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members