Code:
on join:
if "%player%" is "GamerThings":
if {ip.gamerthings} contains IP of player: (correcting to if player is "GamerThings":)
execute console command "lp user %player% parent set fakeowner"
send "&9&l2FA &8» &aGamerThings, &7For security reasons, we have logged you out and removed all rights.
else:
wait 60 ticks
execute console command "lp user %player% parent set owner"
send "&9&l2FA &8» &aGamerThings, &7We marked you as “trustworthy” based on your IP address and automatically logged you in."
command /login [<text>]:
permission: aygaria.2fa.gamerthings
permission message: &9&l2FA &8» &cThe command is not an exist! Please give an another Command!
trigger:
if arg 1 is equal to {loginpassword.gamerthings}:
set {ip.gamerthings} to IP of player
execute console command "lp user GamerThings parent remove fakeowner"
execute console command "lp user GamerThings parent set owner"
send "&9&l2FA &8» &aGamerThings, &7You have successfully verified yourself! &cWe have saved your IP and time!"
set {lastlogin.2fa} to %IP of player%.%time%
if arg 1 is not set:
send "&9&l2FA &8» &cUsage: /login (Password)"
Last edited: