Package com.plotsquared.core.command
Class Like
java.lang.Object
com.plotsquared.core.command.Command
com.plotsquared.core.command.SubCommand
com.plotsquared.core.command.Like
-
Nested Class Summary
Nested classes/interfaces inherited from class com.plotsquared.core.command.Command
Command.CommandException, Command.CommandResult
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
getLikesPercentage
(Plot plot) Get the likes to dislike ratio of a plot as a percentage (in decimal form)protected boolean
handleLike
(PlotPlayer<?> player, String[] args, boolean like) boolean
onCommand
(PlotPlayer<?> player, String[] args) tab
(PlotPlayer<?> player, String[] args, boolean space) Methods inherited from class com.plotsquared.core.command.SubCommand
execute
Methods inherited from class com.plotsquared.core.command.Command
canExecute, check, checkArgs, checkTrue, equals, getAliases, getCommand, getCommand, getCommandById, getCommands, getCommands, getCommands, getCommandString, getDescription, getFullId, getId, getMatch, getParent, getPermission, getRequiredArguments, getRequiredType, getUsage, hasConfirmation, hashCode, init, matches, paginate, register, sendUsage, setRequiredArguments, tabOf, toString
-
Constructor Details
-
Like
-
-
Method Details
-
getLikesPercentage
Get the likes to dislike ratio of a plot as a percentage (in decimal form)- Parameters:
plot
- plot- Returns:
- likes to dislike ratio, returns zero if the plot has no likes
-
handleLike
-
onCommand
- Specified by:
onCommand
in classSubCommand
-
tab
-