Class NuVotifierVelocity

java.lang.Object
com.vexsoftware.votifier.velocity.NuVotifierVelocity
All Implemented Interfaces:
com.vexsoftware.votifier.platform.ProxyVotifierPlugin, com.vexsoftware.votifier.platform.VotifierPlugin, com.vexsoftware.votifier.VoteHandler

public class NuVotifierVelocity extends Object implements com.vexsoftware.votifier.VoteHandler, com.vexsoftware.votifier.platform.ProxyVotifierPlugin
  • Field Details

    • logger

      @Inject public org.slf4j.Logger logger
    • configDir

      @Inject public Path configDir
    • server

      @Inject public com.velocitypowered.api.proxy.ProxyServer server
  • Constructor Details

    • NuVotifierVelocity

      public NuVotifierVelocity()
  • Method Details

    • reload

      public boolean reload()
    • onServerStart

      public void onServerStart(com.velocitypowered.api.event.proxy.ProxyInitializeEvent event)
    • onServerStop

      public void onServerStop(com.velocitypowered.api.event.proxy.ProxyShutdownEvent event)
    • onProxyReload

      public void onProxyReload(com.velocitypowered.api.event.proxy.ProxyReloadEvent event)
    • getServer

      public com.velocitypowered.api.proxy.ProxyServer getServer()
    • getLogger

      public org.slf4j.Logger getLogger()
    • getPluginLogger

      public com.vexsoftware.votifier.platform.LoggingAdapter getPluginLogger()
      Specified by:
      getPluginLogger in interface com.vexsoftware.votifier.platform.VotifierPlugin
    • getScheduler

      public com.vexsoftware.votifier.platform.scheduler.VotifierScheduler getScheduler()
      Specified by:
      getScheduler in interface com.vexsoftware.votifier.platform.VotifierPlugin
    • isDebug

      public boolean isDebug()
      Specified by:
      isDebug in interface com.vexsoftware.votifier.platform.VotifierPlugin
    • getTokens

      public Map<String,Key> getTokens()
      Specified by:
      getTokens in interface com.vexsoftware.votifier.platform.VotifierPlugin
    • getProtocolV1Key

      public KeyPair getProtocolV1Key()
      Specified by:
      getProtocolV1Key in interface com.vexsoftware.votifier.platform.VotifierPlugin
    • onVoteReceived

      public void onVoteReceived(com.vexsoftware.votifier.model.Vote vote, com.vexsoftware.votifier.net.VotifierSession.ProtocolVersion protocolVersion, String remoteAddress)
      Specified by:
      onVoteReceived in interface com.vexsoftware.votifier.VoteHandler
    • onError

      public void onError(Throwable throwable, boolean alreadyHandledVote, String remoteAddress)
      Specified by:
      onError in interface com.vexsoftware.votifier.VoteHandler
    • getAllBackendServers

      public Collection<com.vexsoftware.votifier.platform.BackendServer> getAllBackendServers()
      Specified by:
      getAllBackendServers in interface com.vexsoftware.votifier.platform.ProxyVotifierPlugin
    • getServer

      public Optional<com.vexsoftware.votifier.platform.BackendServer> getServer(String name)
      Specified by:
      getServer in interface com.vexsoftware.votifier.platform.ProxyVotifierPlugin