Skript Version: 2.2 dev36 (currently latest, downloaded from: https://github.com/SkriptLang/Skript/releases)
Skript Author: CustomWorldYT (Me)
Minecraft Version: 1.12.2 Spigot
I'm trying to do an IP check system for my staff, my server is FreeOP and so it's running offline mode. The problem is, my code is not working for some reason, it will always let players join even if they have other IP and they logged in using staff account. I don't know much about list variables, I tired to browse many videos, and docs, forums, etc. but I'm confused when I use "contains". I already asked on GitHub, but they said that "contains" has been already fixed. Help me, I'm confused. Don't blame me if those aren't even list variables, they are complicated, and any help would make me happy.
---
Full Code:
Errors on Reload:
Console Errors:
Other Useful Info:
Addons using (including versions):
none
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I'm confused. I just can't get it work.
Thank you.
Skript Author: CustomWorldYT (Me)
Minecraft Version: 1.12.2 Spigot
I'm trying to do an IP check system for my staff, my server is FreeOP and so it's running offline mode. The problem is, my code is not working for some reason, it will always let players join even if they have other IP and they logged in using staff account. I don't know much about list variables, I tired to browse many videos, and docs, forums, etc. but I'm confused when I use "contains". I already asked on GitHub, but they said that "contains" has been already fixed. Help me, I'm confused. Don't blame me if those aren't even list variables, they are complicated, and any help would make me happy.
---
Full Code:
code_language.skript:
on join:
if {cw_ips::%player%} does not contain player's IP: #Here is it little buggy.
broadcast "&cWARNING - &e%player% &cis an Imposter! Kicking him..." #Perform an action, when player imposes as staff
else:
stop
command /addip [<text>]:
trigger:
if player's name is {@admins} or {@co-owners} or {@owners} or {@moderators} or {@helpers}: #If player is staff... (I'm running freeop server, meaning I can't use permissions)
if arg 1 is not set:
add ip of player to {cw_ips::%player%} #fine... ?
message "&aAdded &e%IP of player% &ato list of your IPs." to player
stop
else:
add argument 1 to {cw_ips::%player%}
message "&aAdded &e%argument% &ato list of your IPs." to player
stop
else:
message "%{cw::lang::only-staff}%" to player
stop
command /clearips:
trigger:
if player's name is {@admins} or {@co-owners} or {@owners} or {@moderators} or {@helpers}: #If player is staff... (I'm running freeop server, meaning I can't use permissions)
delete {cw_ips::%player%} #Clear IPs of player
message "&cDeleted &lALL &cof your IPs. Assign a new one right now by using &e/addmyip&c." to player
stop
else:
message "Only staff can execute this command." to player
stop
Errors on Reload:
code_language.skript:
"All scripts loaded without errors."
Console Errors:
code_language.skript:
None
Other Useful Info:
Addons using (including versions):
none
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I'm confused. I just can't get it work.
Thank you.