Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ================================================================
- # ----------------------------------------------------------------
- #
- # ••• IP Check •••
- #
- # • Easy and simple Skript code! Author: MrRukes •
- # • Version: 1.2 •
- # • If you have any problem or idea, contact me with PM on Spigot :) •
- #
- #
- # ----------------------------------------------------------------
- # ================================================================
- # Code settings
- # ================================================================
- options:
- # Now, set the kick message. While someone join server with that nick & IP is not his, he recive this kick message
- # Note: You can use color codes with > & < !!
- KickMessage: &c&lThis is not your account!
- # Set the main prefix
- # Note: You can use color codes with > & < !!
- Prefix: &7[&9IPCheck&7]
- # Do you want to send warning to console ?
- WarnConsle: true
- # Set the main command permission.
- Permission: ipcheck.use
- # Set the needed permission message.
- PermissionMessage: &4Oops, you don't have permissions...
- # More comming soon :)
- # If you have any problem or idea, contact me with PM on Spigot :)
- # ================================================================
- # Skript code, do not edit, if you not understand!
- # ================================================================
- on connect:
- if {ipcheck::%player%} is set:
- wait 1 tick
- if "%IP of player%" is not "%{ipcheck::%player%}%":
- kick the player due to "{@KickMessage}"
- if {@WarnConsle} is true:
- send "{@Prefix} &cHey, somebody &b(%IP of player%) &ctried to join with &4%player%'s &caccount!" to console
- command /ipcheck [<text>] [<player>] [<text>]:
- permission: {@Permission}
- permission message: {@PermissionMessage}
- trigger:
- if argument 1 is set:
- if argument 1 is "set":
- if argument 2 is set:
- if argument 3 is set:
- set {ipcheck::%arg player%} to "%arg 3%"
- message "{@Prefix} &aIP &b%arg 3% &ahas been set to &b%arg player%'s &aname, successfully!"
- stop
- else:
- message "{@Prefix} &cPlease type an IP."
- stop
- else:
- message "{@Prefix} &cPlease type player's name."
- stop
- if argument 1 is "see":
- if argument 2 is not set:
- if {ipcheck::%player%} is set:
- message "{@Prefix} &bYour &alocked IP is %{ipcheck::%player%}%"
- stop
- else:
- message "{@Prefix} &cYour IP is not locked."
- stop
- else:
- if {ipcheck::%arg player%} is set:
- message "&9» &b%arg player%'s &alocked IP is %{ipcheck::%arg player%}%"
- stop
- else:
- message "{@Prefix} &c%arg player%' IP is not locked."
- if argument 1 is "unset":
- if argument 2 is set:
- if {ipcheck::%arg player%} is set:
- delete {ipcheck::%arg player%}
- message "{@Prefix} &aIP &b%arg player%'s &aIP was unlocked, successfully!"
- stop
- else:
- message "{@Prefix} &cThis player has not been set."
- stop
- else:
- message "{@Prefix} &cPlease type player's name."
- stop
- if argument 1 is "seeip":
- if argument 2 is not set:
- message "&9» &bYour &aip is %IP of player%"
- stop
- else:
- message "&9» &b%arg player%'s &aip is %IP of arg player%"
- stop
- if argument 1 is not "set" or "see" or "unset" or "seeip":
- message "&9» {@Prefix} &9«"
- message "&9» &aLock an IP to player's nickname &b/ipcheck set <player> <ip>"
- message "&9» &aUnlock an IP from player's nickname &b/ipcheck unset <player> <ip>"
- message "&9» &aShow player's IP (if locked) &b/ipcheck see <player>"
- message "&9» &aShow player's IP adress &b/ipcheck seeip <player>"
- stop
- else:
- message "&9» {@Prefix} &9«"
- message "&9» &aLock an IP to player's nickname &b/ipcheck set <player> <ip>"
- message "&9» &aUnlock an IP from player's nickname &b/ipcheck unset <player> <ip>"
- message "&9» &aShow player's IP (if locked) &b/ipcheck see <player>"
- message "&9» &aShow player's IP adress &b/ipcheck seeip <player>"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement