Paper plugin that checks whether a player has liked your server on NameMC and runs commands when detected.
Requirements
Installation
plugins/.config.yml./namemcreload to reload.Commands
/namemc/namemcreload (permission namemc.command.reload)Behavior
check-join-event is true, the like is checked when the player joins.check-join-event is false, it is only checked when running /namemc.true, the commands in commands are executed as console.Configuration (config.yml)
# The IP address from which you want to check the player's like status. # It's important that the IP address is spelled correctly. NO SUFFIXES. ip-server: "example.com" # The cache time saved per like. # It should be checked when the player logs in. check-join-event: false # the commands that will be executed when a player's "like" is detected. # commands are executed in that order. commands: - 'lp user {player} meta setsuffix " &aOK"' error-message: "<red>There was an error verifying your like on NameMC, please try again later." api-link: "https://api.namemc.com/server/{server}/likes?profile={uuid}"
Config Notes
ip-server: exact domain or IP of your server on NameMC (no suffixes).check-join-event: enables or disables the PlayerJoinEvent check.commands: list of commands to run if the like is true. Supports {player}.error-message: MiniMessage text sent when the API call fails.api-link: NameMC URL with placeholders.Placeholders
{server} is replaced by ip-server.{uuid} is replaced by the player UUID without dashes.Permissions
namemc.command.reload for /namemcreload.