Paper plugin that checks whether a player has liked your server on NameMC and runs commands when detected.
Requirements
- Paper 1.21+.
- Java 21.
Installation
- Put the jar in
plugins/. - Start the server to generate
config.yml. - Adjust the configuration for your server.
- Restart or run
/namemcreloadto reload.
Commands
/namemc/namemcreload(permissionnamemc.command.reload)
Behavior
- If
check-join-eventistrue, the like is checked when the player joins. - If
check-join-eventisfalse, it is only checked when running/namemc. - If the like is
true, the commands incommandsare 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 thePlayerJoinEventcheck.commands: list of commands to run if the like istrue. Supports{player}.error-message: MiniMessage text sent when the API call fails.api-link: NameMC URL with placeholders.
Placeholders
{server}is replaced byip-server.{uuid}is replaced by the player UUID without dashes.
Permissions
namemc.command.reloadfor/namemcreload.