Hopperlib
Loading...
Searching...
No Matches
cc.mrcl.hopperlib.CommandTools.Voting.Vote Class Reference
Inheritance diagram for cc.mrcl.hopperlib.CommandTools.Voting.Vote:
cc.mrcl.hopperlib.CommandTools.CommandTool

Public Member Functions

 Vote (CommandSender sender, Component prompt)
Vote setYesPercentage (double percentage)
Vote setTimeOut (int seconds)
Vote setCooldownTicks (int ticks)
Vote setCooldownSecs (int seconds)
Vote setCooldownMins (int mins)
Vote setPlayerSelectionFunction (Function< Player, Boolean > playerSelectionFunction)
void startVote ()
Vote onSucceed (Runnable runnable)
Vote onFail (Runnable runnable)
Vote onAlways (Runnable runnable)
Vote onCooldown (Runnable runnable)
int getYesVotes ()
int getNoVotes ()
int getTotalVotes ()
Component getPrompt ()
Public Member Functions inherited from cc.mrcl.hopperlib.CommandTools.CommandTool
 CommandTool (CommandSender sender)
CommandSender getSender ()

Static Public Member Functions

static List< Player > getCooldownList ()

Additional Inherited Members

Protected Member Functions inherited from cc.mrcl.hopperlib.CommandTools.CommandTool
void sendMessage (String message)
Protected Attributes inherited from cc.mrcl.hopperlib.CommandTools.CommandTool
final CommandSender sender

Member Function Documentation

◆ setPlayerSelectionFunction()

Vote cc.mrcl.hopperlib.CommandTools.Voting.Vote.setPlayerSelectionFunction ( Function< Player, Boolean > playerSelectionFunction)
Parameters
playerSelectionFunctionthe function that decides if a player should be considered in the vote
Returns
the changed Vote object

◆ setYesPercentage()

Vote cc.mrcl.hopperlib.CommandTools.Voting.Vote.setYesPercentage ( double percentage)
Parameters
percentagethe percentage of positive answers required to make the vote succeed.
Returns
the changed Vote object

The documentation for this class was generated from the following file:
  • src/main/java/cc/mrcl/hopperlib/CommandTools/Voting/Vote.java