1.8.8 NuVotifier Assistance

Discussion in 'Spigot Plugin Development' started by CommonSenze, Jan 18, 2020.

  1. Hey guys,

    I hope this isn't too much trouble. I'm currently in a predicament where I'm unable to connect my NuVotifier to webpages, or at least, I'm coding something wrong. Here's my code:

    Code (Java):
    import org.bukkit.Bukkit;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;

    import com.vexsoftware.votifier.model.VotifierEvent;

    public class VoteListener implements Listener {

        @EventHandler
        public void vote(VotifierEvent e) {
            Bukkit.broadcastMessage("CALLED FOR "+e.getVote());
        }
    }
    Code (Text):
    # The IP to listen to. Use 0.0.0.0 if you wish to listen to all interfaces on your server. (All IP addresses)
    # This defaults to the IP you have configured your server to listen on, or 0.0.0.0 if you have not configured this.
    host: 0.0.0.0

    # Port to listen for new votes on
    port: 22222

    # All tokens, labeled by the serviceName of each server list.
    tokens:
      # Default token for all server lists, if another isn't supplied.
      default: xxxxx

    # Setting this option to true will disable handling of Protocol v1 packets. While the old protocol is not secure, this
    # option is currently not recommended as most voting sites only support the old protocol at present.
    disable-v1-protocol: false

    # Configuration section for all vote forwarding to NuVotifier
    forwarding:
      # Sets whether to set up a remote method for fowarding. Supported methods:
      # - none - Does not set up a forwarding method.
      # - pluginMessaging - Sets up plugin messaging.
      # - proxy - Proxies votes to other NuVotifier servers from this server.
      method: proxy
      pluginMessaging:
        channel: nuvotifier:votes

        #Only send votes to certain servers. If a server is present on excludedServers, then votes will NOT be forwarded
        #to them. If excludedServers is not present, votes will be sent to all servers.
        # If onlySendToJoinedServer is true and a player is on one of these servers, NuVotifier will process the vote as if the
        # player was not on the network at all.
        #excludedServers:
        #- server1
        #- server2

        # If uncommented, turns excludedServers into an includedServers, where only servers on the list will be used.
        #whitelist: true

        # Sets which cache to use if there are no players on the server that the vote is being sent to. Supported caches:
        # - none - Votes will simply be lost when no players are present on the server.
        # - memory - Votes will be cached in memory when no players are present. When Bungee is restarted, the votes will be lost.
        # - file - Votes will be saved to a local file every 3 minutes and on shutdown and reloaded when Bungee is restarted. This is suitable for
        #   most set ups.
        cache: file
        # Only sends the vote to the server in which the player is currently joined.
        onlySendToJoinedServer: false
        #Sets which server to send the vote in the event the player is not online when the vote is cast
        #If you do not want the vote forwarded to a fallback, set this value to empty ('')
        #ONLY USED IF onlySendToJoinedServer is true!!
        joinedServerFallback: 'Hub'
        # Defines how quickly to dump votes over a player's connection when offloading a cache in votes per second
        dumpRate: 5
        # Options for file caching.
        file:
          name: cached-votes.json
          # days before a vote is considered 'dead' - removed from cache with a console warning
          cacheTime: 10
        # Options for memory caching.
        memory:
          # days before a vote is considered 'dead' and removed from memory. All votes are removed when the server restarts. -1 signifies no TTL
          cacheTime: -1
      # Specify servers to proxy votes for.
      proxy:
        Lobby:
          address: localhost
          port: 22223
          token: xxxxx

    Code (Text):
    # The IP to listen to. Use 0.0.0.0 if you wish to listen to all interfaces on your server. (All IP addresses)
    # This defaults to the IP you have configured your server to listen on, or 0.0.0.0 if you have not configured this.
    host: 0.0.0.0

    # Port to listen for new votes on
    port: 22223

    # Setting this option to true will disable handling of Protocol v1 packets. While the old protocol is not secure, this
    # option is currently not recommended as most voting sites only support the old protocol at present. However, if you are
    # using NuVotifier's proxy forwarding mechanism, enabling this option will increase your server's security.
    disable-v1-protocol: true

    # All tokens, labeled by the serviceName of each server list.
    tokens:
      # Default token for all server lists, if another isn't supplied.
      default: xxxxx

    # Configuration section for all vote forwarding to NuVotifier
    forwarding:
      # Sets whether to set up a remote method for fowarding. Supported methods:
      # - none - Does not set up a forwarding method.
      # - pluginMessaging - Sets up plugin messaging
      method: none
      pluginMessaging:
        channel: nuvotifier:votes

    Thanks for reading! Hope my issue isn't too difficult for anyone and can be solved soon!