Hello!
Discord2FA is a plugin that protect your players from malicious people.
Players added to the verification list are taken into check state when they join the game and plugin sent the auth code to the specified Discord user.
On the application's page, go to the Bot tab, click Add Bot, and confirm.
Enable the SERVER MEMBERS INTENT option under Privileged Gateway Intents on the bot tab as well.
Click copy button under Token on the bot tab.
Stop your server, and install the plugin then open configuration file.
Paste the bot token you copied earlier into the bot-token value.
Click here and paste your bot's Client ID value to the page.
Done! you're now created & invited a new bot and installed the plugin. You can configurie all settings in configuration file.
Intended usage Firstly, you need add the player you want to add to the verification list.
How can I add?
You need player's Discord ID.
Use, /discord2fa addToVerifyList <player> <discord id of player>
That's all, when the player join the game, player will have to auth his account with Discord.
Setting directory: User settings/Appearance/Advanced/Developer mode
Tutorial video by ServerMiner
How will the player Auth? The player must use
/auth <code> command for authentication.
How can I remove the player from verification list? If you want to remove the player from verification list, Use
/discord2fa removeFromVerifyList <player>
How can I see verification list? You can see the verify list with using
/discord2fa verifyList
How can I generate back up codes? You can generate back up codes with using
/discord2fa generateBackupCodes <player> Warning: If the back up codes generated before, old codes will be deleted.
More than!
AuthMe (value in the config: authme-support)
LoginSecurity (value in the config: loginsecurity-support)
/discord2fa addToVerifyList <player> <discord id of player>
/discord2fa removeFromVerifyList <player> <discord id of player>
/discord2fa generateBackupCodes <player>
/discord2fa verifyList
/discord2fa removeFromCheck <player>
/discord2fa reloadConfig
/auth <code>
/discord2fa enable
/discord2fa disable
Code (YAML):
mysql:
enabled: false
host: localhost
port: 3306
database: minecraft
username: root
password: 1234
use-ssl: true
bot-token: Your token here.
bot-activity:
enabled: false
type: DEFAULT
value: 'Minecraft'
auth-countdown: 60
number-of-rights: 5
rights-reached-console-command: 'tempban
%player% 20m 2FA Failed' check-for-updates: true
generate-new-code-always: true
auto-verification: true
code-lenght: 6
code-type: NUMERIC
authme-support: true
loginsecurity-support: false
authentication-for-players:
enabled: false
confirm-your-account: '> Hey! `
%player%` is trying to open 2FA! Is this you?%nl%> If you are this player please confirm yourself by pasting the code below into the chat.%nl%> Confirmation code: **%code%**' successfully-confirmed: '> 2FA successfully enabled!'
logs:
enabled: true
player-authenticated: '>
%player%''s account was authenticated.' player-entered-wrong-code: '>
%player% entered wrong code! Left rights: %left%' player-reached-limit: '>
%player% reached the right limit!' admin-ids: - 324289979188510730
canceled-events:
command-use:
cancel: true
whitelisted-commands: - auth
item-drop:
cancel: true
whitelisted-materials: - STONE
block-break:
cancel: true
whitelisted-blocks: - STONE
block-place:
cancel: true
whitelisted-blocks: - STONE
chat-use:
cancel: true
whitelisted-words: - Hello
inventory-click:
cancel: true
whitelisted-materials: - STONE
player-interact:
cancel: true
whitelisted-actions: - PHYSICAL
inventory-open:
cancel: true
whitelisted-inventory-types: - ANVIL
messages:
auto-verify-success-message: '&8&l- &6Automatic verification successful!'
discord-message: 'Your auth code
: %code%' kick-message: '&cYou are kicked from the server because &fauth countdown time &cis reached! &cLeft rights&8:&f
%rights%' msg-send-failed: '&8&l- &6Error while sending message to your Discord!'
auth-message:
format-1: '
%nl% &8&l- &f&lHEY! &6You must be authenticated to connect!
%nl% %nl% &8&l- &6We are sent a code, please check your discord direct messages!.
%nl% &8&l- &6If the code has not been sent,check your direct message settings and try again.
%nl% &8&l- &6/auth <code> &6to authenticate yourself.
%nl% &8&l- &6You have
%countdown% seconds! %nl%' format-2: '
%nl% &8&l- &f&lHEY! &6You must be authenticated to connect!
%nl% %nl% &8&l- &6We are sent a code, please check your discord direct messages!.
%nl% &8&l- &6If the code has not been sent,check your direct message settings and try again.
%nl% &8&l- &6/auth <code> &6to authenticate yourself.
%nl% &8&l- &f
%seconds% left! %nl%' auth-command:
help-message: '&8&l- &6/auth <code>'
already-verified-message: '&8&l- &6Your connect already verified!'
invalid-code-message: '&8&l- &6Invalid code,Left rights:&f
%rights%' auth-success-message: '&8&l- &6Successfully authenticated with your Discord account. Thanks for keeping your account secure.'
backup-code-used: '&8&l- &6You have used a backup code!'
discord2fa-command:
help-message: '
&8&m
--------------------
%nl% &6&lDiscord2FA&8&l -&f&l Help
%nl% %nl% &6Commands: %nl% &f/discord2fa enable
%nl% &f/discord2fa disable
%nl% &f/discord2fa addToVerifyList <player> <discord id
> %nl% &f/discord2fa removeFromVerifyList <player> <discord id
> %nl% &f/discord2fa verifyList
%nl% &f/discord2fa removeFromCheck <player
> %nl% &f/discord2fa generateBackupCodes <player
> %nl% &f/discord2fa reloadConfig
%nl% %nl% &8&m
--------------------'
verifyList-message: ' &6&lVerify List&8
: &f%list% '
player-auth-enter-discord: '&8&l- &6Please enter your Discord in the following format &fName
#Discrimintator' player-auth-confirm-code-sent: '&8&l- &6Please check your Discord direct messages!
(direct messages must be enabled!
)'
player-auth-timeout: '&8&l- &6Confirmation timeout.'
player-auth-discord-acc-not-found: '&8&l- &6We cannot find such a Discord user.'
player-auth-enabled: '&8&l- &62FA successfully enabled!'
player-auth-already-enabled: '&8&l- &62FA already enabled!'
player-auth-disabled: '&8&l- &62FA disabled!'
player-auth-already-disabled: '&8&l- &62FA already disabled!'
invalid-discord-id: '&8&l- &6Invalid Discord ID.'
backup-codes-generated: '&8&l- &6Backup codes was generated for &f
%player%&6 Codes: &f%codes%' added-to-verifyList-message: '&8&l- &f
%player% &6successfully added to verify list with discord id &f%id%.' removed-from-verifyList-message: '&8&l- &f
%player% &6successfully removed from verify list with discord id &f%id%.' reload-success: '&aReload success!'
event-messages:
command-use-message: '&8&l-&6 Please verify your login firstly for use a command!'
item-drop-message: '&8&l-&6 Please verify your login firstly for drop a item!'
block-break-message: '&8&l-&6 Please verify your login firstly for break a block!'
block-place-message: '&8&l-&6 Please verify your login firstly for place a block!'
chat-use-message: '&8&l-&6 Please verify your login firstly for use the chat!'
/discord2fa -> discord2fa.admin
/auth -> No permission, player can use this command when if in the check state.