options: version: 1.0 on script load: send "&r" to console send "&8&l| &fxCheck &8- &f_xKubus_" to console send "&8&l| &fEnabled version {@version}" to console if "{@version}" is not text from "https://code.skript.pl/R3AguebW/raw": send "&8&l| &cThere is an update! &8( &c&nv%text from ""https://code.skript.pl/R3AguebW/raw""% &8)" to console send "&8&l| &cFor more info type /xcheck update" to console send "&r" to console else: send "&r" to console on join: if yaml value "check-updates" from "config" is true: if player has permission "*": if "{@version}" is not text from "https://code.skript.pl/R3AguebW/raw": send "&r" to player send "&8&l| &fᴛʜᴇʀᴇ ɪꜱ ᴀɴ ɴᴇᴡ ᴜᴘᴅᴀᴛᴇ ᴏꜰ xᴄʜᴇᴄᴋ!" to player send "&8&l| &fꜰᴏʀ ᴍᴏʀᴇ ɪɴꜰᴏ ᴛʏᴘᴇ /xᴄʜᴇᴄᴋ ᴜᴘᴅᴀᴛᴇ ᴄᴏᴍᴍᴀɴᴅ" to player send "&r" to player on first join: if player has permission "*": send "&r" to player send "&8&l| &fᴛʜᴀɴᴋꜱ ꜰᴏʀ ᴜꜱɪɴɢ ᴏᴜʀ ꜰᴀᴠᴏʀɪᴛᴇ ꜱᴄʀɪᴘᴛ" to player send "&r" to player function repText(text: text) :: text: replace all "%player%" with "%player%" in {_text} replace all "%checker%" with "%{_checker::%player%}%" replace all "%bans%" with "%{_bans::%player%}%" replace all "%time%" with "%{_time}%" replace all "%status%" with "%{_status::%player%}%" return {_text} on load: if yaml file "plugins/xCheck/config.yml" doesn't exist: load yaml "plugins/xCheck/config.yml" as "config" set yaml value "version" of "config" to "{@version}" set yaml value "update-checker" of "config" to true set yaml value "actionbar-messages" of "config" to true set yaml value "title-messages" of "config" to true set yaml value "subtitle-messages" of "config" to true set yaml value "checking-start-message" of "config" to true set yaml value "checking-ended-messsag" of "config" to true set yaml value "cage" of "config" to true set the comment of yaml node "cage" of "config" to "If you will change it to false, player will be freezed in his location and you will be teleported to him" set yaml value "cage-loc" of "config" to "---------" set yaml value "spawn" of "config" to true set the comments of yaml node "spawn" of "config" to "If 'cage' is enabled and if it is 'false' player will be teleported into his previos location after checking" set yaml value "spawn-loc" of "config" to "---------" set yaml value "checking-other-chat" of "config" to true set yaml value "checking-block-messages" of "config" to true set the comments of yaml node "checking-block-messages" of "config" to "If 'other-chat' is 'false' player's messages will not be sended on public chat" set yaml value "checking-block-commands" of "config" to true set yaml value "ban-player-after-leave" of "config" to true set yaml value "ban-player-after-leave.ban-time" of "config" to 10080 set the comments of yaml node "ban-player-after-leave" of "config" to "Ban time in minutes eg. 10080 minutes - 7 days" set yaml list "permitted-players" of "config" to "Notch" and "_xKubus_" and "jeb_" set the comments of yaml node "permitted-players" of "config" to "Players that cannot be checked and banned for cheating" set yaml list "ban-broadcast" of "config" to "&r" and "&8&l| &7ᴘʟᴀʏᴇʀ &f%player% &7ʟᴇꜰᴛ ᴅᴜʀɪɴɢ ᴄʜᴇᴄᴋɪɴɢ" and "&8&l| &7ᴄʜᴇᴄᴋᴇʀ&8: &f%checker%" and "&r" set yaml list "deny-command" of "config" to "&r" and "&8&l| &cʏᴏᴜ ᴄᴀɴ'ᴛ ᴅᴏ ɪᴛ ᴅᴜʀɪɴɢ ᴄʜᴇᴄᴋɪɴɢ" and "&r" set yaml list "deny-messages" of "config" to "&r" and "&8&l| &cʏᴏᴜ ᴄᴀɴ'ᴛ ᴅᴏ ɪᴛ ᴅᴜʀɪɴɢ ᴄʜᴇᴄᴋɪɴɢ, ᴜꜱᴇ /ʜᴇʟᴘᴏᴘ" and "&r" set yaml value "checking-other-chat-prefix" of "config" to "&c&lCHECKING &8&l|" set yaml list "help-message" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&a» &f/check " and "&a» &f/clear " and "&a» &f/cheaty " and "&a» &f/coop " and "&a» &f/xcheck tp" and "&a» &f/xcheck spectate " and "&a» &f/xcheck stats " and "&a» &f/xcheck resetstats " and "&a» &f/xcheck setcage" and "&a» &f/xcheck setlobby" and "&a» &f/xcheck history " and "&a» &f/xcheck help" and "&r" set yaml list "countdown-message" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ᴄʜᴇᴄᴋɪɴɢ ᴡɪʟʟ ꜱᴛᴀʀᴛ ᴀꜰᴛᴇʀ &c%time% &7ꜱᴇᴄᴏɴᴅꜱ" and "&7ɪꜰ ʏᴏᴜ ᴡᴀɴᴛ ᴛᴏ ᴄᴀɴᴄᴇʟ &nᴄʟɪᴄᴋ ʜᴇʀᴇ" set yaml value "check-title" of "config" to "&4&lʏᴏᴜ ᴀʀᴇ ᴄʜᴇᴄᴋɪɴɢ" set yaml value "check-subtitle" of "config" to "&4&lᴄᴏᴏᴘᴇʀᴀᴛᴇ ᴡɪᴛʜ ᴛʜᴇ ᴀᴅᴍɪɴɪꜱᴛʀᴀᴛᴏʀ" set yaml list "check-broadcast" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ᴛʜᴇ ᴘʟᴀʏᴇʀ ɪꜱ ᴄʜᴇᴄᴋᴇᴅ ꜰᴏʀ ꜱᴜꜱᴘɪᴄɪᴏɴ ᴏꜰ ʜᴀᴠɪɴɢ ᴄʜᴇᴀᴛꜱ" and "&8» &7ᴄʜᴇᴄᴋᴇʀ&8: &f%checker%" and "&r" set yaml list "check-message" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʏᴏᴜ ᴀʀᴇ ᴄʜᴇᴄᴋᴇᴅ ꜰᴏʀ ꜱᴜꜱᴘɪᴄɪᴏɴ ᴏꜰ ʜᴀᴠɪɴɢ ᴄʜᴇᴀᴛꜱ" and "&7ꜰᴏʟʟᴏᴡ ᴀᴅᴍɪɴɪꜱᴛʀᴀᴛᴏʀ ɪɴꜱᴛʀᴜᴄᴛɪᴏɴꜱ" and "&8» &7ᴄʜᴇᴄᴋᴇʀ&8: &f%checker%" and "&r" set yaml list "spawn-not-set" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʙᴇꜰᴏʀᴇ ᴄʜᴇᴄᴋɪɴɢ ꜱᴇᴛᴜᴘ ᴀ ꜱᴘᴀᴡɴ, ᴜꜱɪɴɢ /xᴄʜᴇᴄᴋ ꜱᴇᴛʟᴏʙʙʏ" and "&r" set yaml list "cage-not-set" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʙᴇꜰᴏʀᴇ ᴄʜᴇᴄᴋɪɴɢ ꜱᴇᴛᴜᴘ ᴀ ᴄᴀɢᴇ, ᴜꜱɪɴɢ /xᴄʜᴇᴄᴋ ꜱᴇᴛᴄᴀɢᴇ" and "&r" set yaml list "already-checking" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ᴘʟᴀʏᴇʀ ɪꜱ ᴀʟʀᴇᴀᴅʏ ᴄʜᴇᴄᴋɪɴɢ ʙʏ ᴏᴛʜᴇʀ ᴀᴅᴍɪɴ" and "&r" set yaml list "cant-check" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʏᴏᴜ ᴄᴀɴ'ᴛ ᴄʜᴇᴄᴋ ᴛʜɪꜱ ᴘʟᴀʏᴇʀ" and "&r" set yaml list "select-player" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʏᴏᴜ ᴍᴜꜱᴛ ꜱᴇʟᴇᴄᴛ ᴘʟᴀʏᴇʀ ᴛᴏ ᴄʜᴇᴄᴋ" and "&r" set yaml list "no-permission" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʏᴏᴜ ᴅᴏ ɴᴏᴛ ʜᴀᴠᴇ ʀᴇǫᴜɪʀᴇᴅ ᴘᴇʀᴍɪꜱꜱɪᴏɴꜱ" and "&r" set yaml list "admission-confirm" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ɪꜰ ʏᴏᴜ ʜᴀᴠᴇ ᴄʜᴇᴀᴛꜱ ᴄʟɪᴄᴋ ʜᴇʀᴇ, ʏᴏᴜ ᴡɪʟʟ ɢᴇᴛ ʙᴀɴɴᴇᴅ" and "&r" set yaml list "admission-cant-use" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʏᴏᴜ ᴄᴀɴ'ᴛ ᴜꜱᴇ ɪᴛ ɪꜰ ʏᴏᴜ ᴀʀᴇ ɴᴏᴛ ᴄʜᴇᴄᴋɪɴɢ ʙʏ ᴀᴅᴍɪɴɪꜱᴛʀᴀᴛᴏʀ" and "&r" set yaml list "clear-confirm" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ᴄᴏɴꜰɪʀᴍ ᴀᴄᴛɪᴏɴ ʙʏ ᴄʟɪᴄᴋɪɴɢ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ" and "&r" set yaml list "not-checking" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ʏᴏᴜ ᴅᴏ ɴᴏᴛ ᴄʜᴇᴄᴋɪɴɢ ᴛʜɪꜱ ᴘʟᴀʏᴇʀ" and "&r" set yaml list "this-player-not-checking" of "config" to "&r" and "&4&lᴄʜᴇᴄᴋɪɴɢ" and "&7ᴛʜɪꜱ ᴘʟᴀʏᴇʀ ɪꜱ ɴᴏᴛ ᴄʜᴇᴄᴋɪɴɢ, ᴜꜱᴇ /ᴄʜᴇᴄᴋ ᴄᴏᴍᴍᴀɴᴅ" and "&r" on quit: if {_checking::%player%} is true: set {_checking::%player%} to false set {_banTime} to yaml value "ban-player-after-leave.ban-time" from "config" execute console command "tempban %player% %{_banTime}%m Logout" set {_text} to yaml list "ban-broadcast" from "config" set {_banBroadcast} to coloured repText({_text}) send "%{_banBroadcast}%" to all players stop on command: if {_checking::%player%} is true: set {_value} to coloured yaml value "checking-block-commands" from "config" if {_value} is true: cancel event set {_text} to yaml list "deny-command" from "config" set {_denyCommand} to coloured repText({_text}) send "%{_text}%" to player on chat: if {_checking::%player%} is true: set {_value} to yaml value "checking-block-messages" from "config" if {_value} is true: cancel event set {_text} to yaml list "deny-messages" from "config" set {_denyMessages} to coloured repText({_text}) send "%{_text}%" to player else: set {_value} to yaml value "checking-other-chat" from "config" if {_value} is true: cancel event set {_message} to message set {_text} to yaml list "checking-other-chat-prefix" from "config" set {_privateChatPrefix} to coloured repText({_text}) send "%{_text}% %player% &8>> &f%{_message}%" to {_checker::%player%} else: stop on any move: set {_value} to yaml value "cage" from "config" if {_value} is false: if {_checking::freze::%player%} is true: cancel event set {_text} to yaml list "deny-messages" from "config" set {_denyMessages} to coloured repText({_text}) send "%{_text}%" to player on damage: set {_value} to yaml value "cage" from "config" if {_value} is false: if {_checking::freze::%victim%} is true: cancel event set {_text} to yaml list "deny-messages" from "config" set {_denyMessages} to coloured repText({_text}) send "%{_text}%" to victim on damage: set {_value} to yaml value "cage" from "config" if {_value} is false: if {_checking::freze::%attacker%} is true: cancel event set {_text} to yaml list "deny-messages" from "config" set {_denyMessages} to coloured repText({_text}) send "%{_text}%" to attacker on break: set {_value} to yaml value "cage" from "config" if {_value} is false: if {_checking::freze::%player%} is true: cancel event set {_text} to yaml list "deny-messages" from "config" set {_denyMessages} to coloured repText({_text}) send "%{_text}%" to attacker command /check []: aliases: sprawdz trigger: if arg-player is set: set {_list} to yaml list "permitted-players" from "config" loop {_list}: if loop-value is not arg-player: if {_checking::%arg-player%} is false: set {_value} to yaml value "cage-loc" from "config" if {_value} is set: set {_value} to yaml value "spawn" from "config" if {_value} is true: set {_value} to yaml value "spawn-loc" if {_value} is set: if player has permission "xcheck.check": set {_text} to yaml value "countdown-message" from "config" set {_time} to 5 loop 5 times: set {_compond} to coloured repText({_text}) set {_a} to new text component from "%{_compond}%" set click event of {_a} to a new click event to run command "/xcheck cancel" remove 1 from {_time} send component {_a} to player if {_cancel::%player%} is true: stop set {_cage} to yaml value "cage-loc" from "config" set {_value} to yaml value "cage" from "config" if {_value} is true: teleport arg-player to {_cage} teleport player to {_cage} else: set {_checking::freze::%arg-player%} to true set {_checking::%arg-player%} to true set {_checker::%arg-player%} to player set {_title} to yaml value "check-title" from "config" set {_titleCheck} to coloured repText({_title}) set {_subtitle} to yaml value "check-subtitle" from "config" set {_subtitleCheck} to coloured repText({_subtitle}) loop untill stop: if {_checking::%arg-player%} is true: send title "%{_titleCheck}%" with subtitle "%{_subtitleCheck}%" to arg-player else: stop loop set {_text} to yaml list "check-broadcast" from "config" set {_checkBroadcast} to coloured repText({_text}) send "%{_checkBroadcast}%" to all players set {_text} to yaml list "check-message" from "config" set {_checkMessage} to coloured repText({_text}) send "%{_checkMessage}%" to arg-player set {_value} to yaml value "%player%" from "stats" add 1 to {_value} set yaml value "%player%" of "config" to "%{_value}%" stop else: set {_text} to yaml list "no-permission" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "spawn-not-set" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_checking::tpback::%arg-player%} to true else: set {_text} to yaml list "cage-not-set" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "already-checking" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "cant-check" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "select-player" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player command /admission: aliases: przyznanie trigger: if {_checking::%player%} is true: if player has permission "xcheck.admission": set {_text} to "admission-confirm" from "config" set {_compond} to coloured repText({_text}) set {_a} to new text component from "%{_compond}%" set click event of {_a} to a new click event to run command "/xcheck confirm" send component {_a} to player stop else: set {_text} to yaml list "no-permission" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "admission-cant-use" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player command /clear []: aliases: czysty trigger: if {_checking::%arg-player%} is true: if player has permission "xcheck.clear": loop {_checker::%arg-player%}: if loop-value is player: set {_text} to yaml list "clear-confirm" from "config" set {_compond} to coloured repText({_text}) set {_a} to new text component from "%{_compond}%" set click event of {_a} to a new click event to run command "/xcheck confirmclear" send component {_a} to player stop else: set {_text} to yaml list "not-checking" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "no-permission" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player else: set {_text} to yaml list "this-player-not-checking" from "config" set {_mess} to coloured repText({_text}) send "%{_mess}%" to player command /xcheck [] [] []: aliases: check, xkubus trigger: if arg 1 is not set: set {_text} to yaml list "help-message" from "config" set {_helpMessage} to coloured repText({_text}) send "%{_text}%" to attacker if arg 1 is "check":