This plugin lets your players authenticate their email address.
Features
- send authentication emails via any provider (Gmail recommended)
- customize the email content
- full HTML support
- execute commands when a player registered
- customizeable messages
Mail preview
Commands
- /register <email> - Register a email address
- /auth <code> - Authenticate with the code sent in the email
- /unregister - Removes the registration
- /emailadmin list <pending|registered> - Lists the specified player information
Permissions
- emailauth.register - Permission for the register command
- emailauth.auth - Permission for the auth command
- emailauth.unregister - Permission for the unregister command
- emailauth.admin - Permission for the admin command
Config
Code (YAML):
#Email account settings
account:
username: '[email protected]'
password: '12345'
#Mail-server settings, configured for GMail by default
server:
host: 'smtp.gmail.com'
port: 587
mail:
from: '[email protected]'
subject: 'EmailAuth by inventivetalent'
code:
#Length of the generated code
length: 8
#Actions executed when a player registers
on_auth:
run_command:
enabled: false
console: true
commands:
- '/say %player% just registered their email address!'
messages:
prefix: '&a[EmailAuth]&r '
permission: '&cNo permission'
invalid_email: '&cInvalid E-Mail format'
already_pending: '&cYour authentication is already pending'
pending_canceled: '&cCancelled your pending registration'
not_pending: '&cYour authentication is not pending'
not_registered: '&cYou are not registered'
wrong_code: '&cYou have entered the wrong code'
already_auth: '&cYou have already authenticated your account'
success_register: '&aWe''ve sent you an EMail! Please follow its instructions'
success_unregister: '&aYour registration has been removed'
success_auth: '&aSuccessfully authenticated your EMail with your Minecraft account!'
NOTE: This uses the JavaMail API which is included in the plugin file. If you have any problems with it not being installed correctly, you can download javax.mail.jar here and copy it into the plugin folder.
API
The plugin also has an API to listen for authentications
Code (Java):AuthListener.addListener(new AuthListener(plugin) {
@Override
public void onRegister(Player player, String email) {
}
@Override
public void onAuthenticate(Player player) {
}
});
Links
Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.

EmailAuth [+ API] 1.0.1
Email authentication for your players