1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Loop value variable loses values on stop

Discussion in 'Skript' started by KroterPvP, Jul 22, 2017.

Thread Status:
Not open for further replies.
  1. KroterPvP

    KroterPvP Active Member

    Joined:
    Apr 10, 2017
    Messages:
    178
    Likes Received:
    7
    Hi, I'm having troubles with my punishment skript (SuperBans).

    Every time a player is banned/tempbanned, he's added to {bans::*} and removed when unbanned. But on every server stop all the values of the variable {bans::*} are losed and rewrited with "null". I don't know what's wrong.

    I'm using Skript 2.2 bensku's edit dev-27
    Addons:
    • SkQuerry3
    • Skellett
    Full SuperBans code:
    Code (Skript):
    1. #  =========================================================================================================================
    2. #
    3. #              .--.--.                                                  ,---,.                                
    4. #             /  /    '.               ,-.----.                       ,'  .'  \                              
    5. #            |  :  /`. /          ,--, \    /  \             __  ,-.,---.' .' |                  ,---,        
    6. #            ;  |  |--`         ,'_ /| |   :    |          ,' ,'/ /||   |  |: |              ,-+-. /  | .--.--.
    7. #            |  :  ;_      .--. |  | : |   | .\ :   ,---.  '  | |' |:   :  :  /  ,--.--.    ,--.'|'   |/  /    '
    8. #             \  \    `. ,'_ /| :  . | .   : |: |  /     \ |  |   ,':   |    ;  /       \  |   |  ,"' |  :  /`./
    9. #              `----.   \|  ' | |  . . |   |  \ : /    /  |'  :  /  |   :     \.--.  .-. | |   | /  | |  :  ;_
    10. #              __ \  \  ||  | ' |  | | |   : .  |.    ' / ||  | '   |   |   . | \__\/: . . |   | |  | |\  \    `.
    11. #             /  /`--'  /:  | : ;  ; | :     |`-''   ;   /|;  : |   '   :  '; | ," .--.; | |   | |  |/  `----.   \
    12. #            '--'.     / '  :  `--'   \:   : :   '   |  / ||  , ;   |   |  | ; /  /  ,.  | |   | |--'  /  /`--'  /
    13. #              `--'---'  :  ,      .-./|   | :   |   :    | ---'    |   :   / ;  :   .'   \|   |/     '--'.     /
    14. #                         `--`----'    `---'.|    \   \  /          |   | ,'  |  ,     .-./'---'        `--'---'
    15. #                                        `---`     `----'           `----'     `--`---'
    16. #           Spigot: https://goo.gl/iojiPc  | SkUnity: https://goo.gl/S6Hu85                      Created by KroterPvP
    17. #
    18. #  =========================================================================================================================
    19.  
    20. #=========================================================================#
    21. #                   MESSAGES, OPTIONS & CONFIGURATION                     #
    22. #=========================================================================#
    23. options:
    24.     file name: SuperBans
    25.     check to unban tempbanned players: 1
    26.     max warns: 4
    27.     keep unban gui open: true
    28.     prefix: &c&lSuperBans &8» &7
    29.     dissallowed muted cmds: "msg" or "tell" or "helpop"
    30.     unknown cmd message: Unknown command. Type ""/help"" for help.
    31.     default ban reason: Default ban reason. Change it in the config
    32.     default tempban reason: Default tempban reason. Change it in the config
    33.     default mute reason: Default mute reason. Change it in the config
    34.     default kick reason: Default kick reason. Change it in the config
    35.     default kickall reason: Default kickall reason. Change it in the config
    36.  
    37. # BAN - Variables: %nl%, %{sban.bannedby.%{_p}%}%, %{sban.bannedon.%{_p}%}%, %{sban.banexpire.%{_p}%}%, %{sban.banip.%{_p}%}%, %{sban.banreason.%{_p}%}%
    38.     ban screen message: &7Sadly, you were &cBanned &7from &6ServerName&7. Apply on our forums if you want to dispute your ban!%nl%%nl%&7Banned by: &a%{sban.bannedby.%{_p}%}%%nl%%nl%&7Banned on: &c%{sban.bannedon.%{_p}%}%%nl%&7Autounban: &c%{sban.banexpire.%{_p}%}%%nl%&7IP Banned: &c%{sban.banip.%{_p}%}%%nl%&7Reason: &c%{sban.banreason.%{_p}%}%%nl%%nl%&eBuy an unban &8» &cwww.yourserver.buycraft.net%nl%&eForums to apply &8» &cwww.yourserver.net
    39.  
    40. # TEMPBAN - Variables: %nl%, %{sban.bannedby.%{_p}%}%, %{sban.bannedon.%{_p}%}%, %{sban.banexpire.%{_p}%}%, %{sban.banip.%{_p}%}%, %{sban.banreason.%{_p}%}%, %{sban.tempbanlenght.%{_p}%}%
    41.     tempban screen message: &7Sadly, you were &cTempBanned &7from &6ServerName&7. Apply on our forums if you want to dispute your ban!%nl%%nl%&7Banned by: &a%{sban.bannedby.%{_p}%}%%nl%&7Banned on: &c%{sban.bannedon.%{_p}%}%%nl%&7Autounban: &c%{sban.banexpire.%{_p}%}% &7(&c%{sban.tempbanlenght.%{_p}%}%&7)%nl%&7IP Banned: &c%{sban.banip.%{_p}%}%%nl%&7Reason: &c%{sban.banreason.%{_p}%}%%nl%%nl%&eBuy an unban &8» &cwww.yourserver.buycraft.net%nl%&eForums to apply &8» &cwww.yourserver.net
    42.  
    43. # KICK - Variables: %nl%, %{sban.kickedby.%{_p}%}%, %{sban.kickreason.%{_p}%}%
    44.     kick message: &7Sadly, you were &cKicked &7from &6ServerName&7. Apply on our forums if you want to dispute your kick!%nl%%nl%&7Kicked by: &a%{sban.kickedby.%{_p}%}%%nl%&7Reason: &c%{sban.kickreason.%{_p}%}%%nl%%nl%&eVisit our shop &8» &cwww.yourserver.buycraft.net%nl%&eForums to apply &8» &cwww.yourserver.net
    45.  
    46. # KICKALL - Variables: %nl%, %{sban.kickedby.%loop-player%}%, %{sban.kickreason.%loop-player%}%
    47.     kickall message: &7Sadly, you were &cKicked &7from &6ServerName&7. Apply on our forums if you want to dispute your kick!%nl%%nl%&7Kicked by: &a%{sban.kickedby.%loop-player%}%%nl%&7Reason: &c%{sban.kickreason.%loop-player%}%%nl%%nl%&eVisit our shop &8» &cwww.yourserver.buycraft.net%nl%&eForums to apply &8» &cwww.yourserver.net
    48.  
    49. # WARN - Variables: %nl%, %{sban.warns.%{_p}%} - 1%, %{sban.warnedby.%{_p}%}%
    50.     max warns message: &7Sadly, you were &cWarned &a%{sban.warns.%{_p}%} - 1% &7times.%nl%%nl%&7Warned by: &a%{sban.warnedby.%{_p}%}%%nl%%nl%&eVisit our store &8» &cwww.yourserver.buycraft.net%nl%&eForums to apply &8» &cwww.yourserver.net
    51.  
    52. #=========================================================================#
    53. #      SUPERBAN CODE | EDIT IT ONLY IF YOU KNOW WHAT YOU'RE DOING!        #
    54. #=========================================================================#
    55. #=====================#
    56. #  SUPERBANS - HELP   #
    57. #=====================#
    58. command /superbans:
    59.     permission: sb.help
    60.     permission message: {@prefix}&cYou don't have permission to do this!
    61.     executable by: console and player
    62.     aliases: /sbans, /superb, /sb
    63.     trigger:
    64.         send " &8&m-------------------------------"
    65.         send " &c&lSuperBans &8» &7Created by &aKroterPvP"
    66.         send ""
    67.         send " &8- &c/ban <player> <reason>"
    68.         send " &8- &c/tempban <player> <reason> <timespan>"
    69.         send " &8- &c/unban <player>"
    70.         send " &8- &c/bans <page>"
    71.         send " &8- &c/mute <player>"
    72.         send " &8- &c/unmute <player>"
    73.         send " &8- &c/warn <player>"
    74.         send " &8- &c/kick <player> <reason>"
    75.         send " &8- &c/kickall <reason>"
    76.         send " &8- &c/check <player>"
    77.         sender is console:
    78.             send ""
    79.             send " &8- &c/sbreload"
    80.             send " &8&m-------------------------------"
    81.         else:
    82.             send " &8- &c/notify <true/false>"
    83.             send ""
    84.             send " &8- &c/sbreload"
    85.             send " &8&m-------------------------------"
    86. #=====================#
    87. #     RELOAD CMD      #
    88. #=====================#
    89. command /superbansreload:
    90.     permission: sb.reload
    91.     permission message: {@prefix}&cYou don't have permission to do this!
    92.     executable by: console and player
    93.     aliases: /sbreload
    94.     trigger:
    95.         make console execute command "/sk reload {@file name}.sk"
    96.         send "{@prefix}&7Reload completed. &o(Check console for errors)" to player
    97. #=====================#
    98. #       NOTIFY        #
    99. #=====================#
    100. command /notify [<text>]:
    101.     permission: sb.notify
    102.     permission message: {@prefix}&cYou don't have permission to do this!
    103.     executable by: console and player
    104.     trigger:
    105.         sender is console:
    106.             send "{@prefix}&7This command is only available for players"
    107.         else:
    108.             if {notify.%player%} is not set:
    109.                 set {notify.%player%} to true
    110.             else:
    111.                 if arg 1 is "true":
    112.                     if {notify.%player%} is false:
    113.                         set {notify.%player%} to true
    114.                         send "{@prefix}&7You will receive punish notifications"
    115.                     else:
    116.                         send "{@prefix}&7Punish notifications are already enabled"
    117.                 if arg 1 is "false":
    118.                     if {notify.%player%} is true:
    119.                         set {notify.%player%} to false
    120.                         send "{@prefix}&7You won't receive punish notifications"
    121.                     else:
    122.                         send "{@prefix}&7Punish notifications are already disabled"
    123.                 if arg 1 is not "true" or "false":
    124.                     send "{@prefix}&7You must use &c/notify <true/false>"
    125.                 if arg 1 is not set:
    126.                     send "{@prefix}&7You must use &c/notify <true/false>"
    127. #=====================#
    128. #         BAN         #
    129. #=====================#
    130. command /ban [<offlineplayer>] [<text={@default ban reason}>]:
    131.     permission: sb.ban
    132.     permission message: {@prefix}&cYou don't have permission to do this!
    133.     executable by: console and player
    134.     trigger:
    135.         if arg 1 is set:
    136.             if arg 2 is set:
    137.                 if {sban.banned.%arg 1%} is true:
    138.                     send "{@prefix}&7This player is already banned"
    139.                 else:
    140.                     if arg 1 has permission "sb.ban.exempt":
    141.                         send "{@prefix}&7This player can't be banned"
    142.                     else:
    143.                         set {sban.banned.%arg 1%} to true
    144.                         set {sban.bannedon.%arg 1%} to now
    145.                         set {sban.banreason.%arg 1%} to arg 2
    146.                         set {sban.banexpire.%arg 1%} to "Never"
    147.                         set {sban.bannedby.%arg 1%} to "%sender%"
    148.                         set {sban.banip.%arg 1%} to false
    149.                         add arg 1 to {bans::*}
    150.                         set {_p} to arg 1
    151.                         kick arg 1 due to "{@ban screen message}"
    152.                         loop all players:
    153.                             if loop-player has permission "sb.ban.notify":
    154.                                 if {notify.%loop-player%} is true:
    155.                                     send "{@prefix}&7I have handled a &a&lNEW BAN&r&7!" to loop-player
    156.                                     send "" to loop-player
    157.                                     send " &7Player banned &8» &e%arg 1%" to loop-player
    158.                                     send " &7Banned by &8» &a%sender%" to loop-player
    159.                                     send " &7Ban reason &8» &7'&a%arg 2%&7'" to loop-player
    160.                                     send " &7Autounban &8» &aNever" to loop-player
    161.                         send "{@prefix}&a%sender% &7banned &e%arg 1% &7('&a%arg 2%&7') &7- (&aNever&7)" to console
    162.             else:
    163.                 send "{@prefix}&7You must use &c/ban <player> <reason>"
    164.         else:
    165.             send "{@prefix}&7You must use &c/ban <player> <reason>"
    166. #=====================#
    167. #       TEMPBAN       #
    168. #=====================#
    169. # The timespan needs to be writed using this format: X second(s), X minute(s), X hour(s), X day(s)
    170. # If you put: "60 seconds, 1 minute" in the 3th argument, it will automaticly change to 2 minutes.
    171. # Example: /tempban PlayerName Do not break the rules! 30 minutes, 5 hours, 8 days
    172.  
    173. command /tempban [<offlineplayer>] [<text={@default tempban reason}>] [<timespan>]:
    174.     permission: sb.tempban
    175.     permission message: {@prefix}&cYou don't have permission to do this!
    176.     executable by: console and player
    177.     trigger:
    178.         if arg 1 is set:
    179.             if arg 2 is set:
    180.                 if arg 3 is set:
    181.                     if {sban.banned.%arg 1%} is true:
    182.                         send "{@prefix}&7This player is already tempbanned"
    183.                     else:
    184.                         if arg 1 has permission "sb.tempban.exempt":
    185.                             send "{@prefix}&7This player can't be tempbanned"
    186.                         else:
    187.                             set {_now} to now
    188.                             set {_timespan} to arg 3
    189.                             add {_timespan} to {_now}
    190.                             set {_remaining} to {_now}
    191.                             set {sban.banned.%arg 1%} to true
    192.                             set {sban.bannedon.%arg 1%} to now
    193.                             set {sban.banreason.%arg 1%} to arg 2
    194.                             set {sban.banexpire.%arg 1%} to {_remaining}
    195.                             set {sban.tempbanlenght.%arg 1%} to arg 3
    196.                             set {sban.bannedby.%arg 1%} to "%sender%"
    197.                             set {sban.banip.%arg 1%} to false
    198.                             add arg 1 to {bans::*}
    199.                             set {_p} to arg 1
    200.                             kick arg 1 due to "{@tempban screen message}"
    201.                             loop all players:
    202.                                 if loop-player has permission "sb.tempban.notify":
    203.                                     if {notify.%loop-player%} is true:
    204.                                         send "{@prefix}&7I have handled a &a&lNEW BAN&r&7!" to loop-player
    205.                                         send "" to loop-player
    206.                                         send " &7Player banned &8» &e%arg 1%" to loop-player
    207.                                         send " &7Banned by &8» &a%sender%" to loop-player
    208.                                         send " &7Ban reason &8» &7'&a%arg 2%&7'" to loop-player
    209.                                         send " &7Autounban &8» &a%{_remaining}% &7(&a%arg 3%&7)" to loop-player
    210.                             send "{@prefix}&a%sender% &7tempbanned &e%arg 1% &7('&a%arg 2%&7') &7- (&a%arg 3%&7)" to console
    211.                 else:
    212.                     send "{@prefix}&7You must use &c/tempban <player> <reason> <timespan>"
    213.             else:
    214.                 send "{@prefix}&7You must use &c/tempban <player> <reason> <timespan>"
    215.         else:
    216.             send "{@prefix}&7You must use &c/tempban <player> <reason> <timespan>"
    217. every {@check to unban tempbanned players} seconds:
    218.     execute console command "/updatetempbantimes"
    219. command /updatetempbantimes:
    220.     permission: sban.updatetempbantimes
    221.     permission message: {@prefix}&cYou don't have permission to do this!
    222.     executable by: console and player
    223.     trigger:
    224.         loop {bans::*}:
    225.             if {sban.banned.%loop-value%} is true:
    226.                 if {sban.banexpire.%loop-value%} is not "Never":
    227.                     set {_elapsedtime} to difference between now and {sban.banexpire.%loop-value%}
    228.                     if {_elapsedtime} is greater than {sban.tempbanlenght.%loop-value%}:
    229.                         execute console command "/unban %loop-value% -s"
    230. #=====================#
    231. #        UNBAN        #
    232. #=====================#
    233. command /unban [<offlineplayer>] [<text>]:
    234.     permission: sb.unban
    235.     permission message: {@prefix}&cYou don't have permission to do this!
    236.     executable by: console and player
    237.     trigger:
    238.         if arg 1 is set:
    239.             if arg 2 is set:
    240.                 if arg 2 is "-s":
    241.                     if {sban.banned.%arg 1%} is true:
    242.                         set {sban.banned.%arg 1%} to false
    243.                         set {sban.bannedon.%arg 1%} to "-"
    244.                         set {sban.banreason.%arg 1%} to "-"
    245.                         set {sban.banexpire.%arg 1%} to "-"
    246.                         set {sban.bannedby.%arg 1%} to "-"
    247.                         set {sban.banip.%arg 1%} to false
    248.                         remove arg 1 from {bans::*}
    249.                     else:
    250.                         send "{@prefix}&7This player is not banned"
    251.             else:
    252.                 if {sban.banned.%arg 1%} is true:
    253.                     set {sban.banned.%arg 1%} to false
    254.                     set {sban.bannedon.%arg 1%} to "-"
    255.                     set {sban.banreason.%arg 1%} to "-"
    256.                     set {sban.banexpire.%arg 1%} to "-"
    257.                     set {sban.bannedby.%arg 1%} to "-"
    258.                     set {sban.banip.%arg 1%} to false
    259.                     remove arg 1 from {bans::*}
    260.                     loop all players:
    261.                         if loop-player has permission "sb.unban.notify":
    262.                             if {notify.%loop-player%} is true:
    263.                                 send "{@prefix}&7I have handled an &a&lUNBAN&r&7!" to loop-player
    264.                                 send "" to loop-player
    265.                                 send " &7Player unbanned &8» &e%arg 1%" to loop-player
    266.                                 send " &7Unbanned by &8» &a%sender%" to loop-player
    267.                     send "{@prefix}&a%sender% &7unbanned &e%arg 1%" to console
    268.                 else:
    269.                     send "{@prefix}&7This player is not banned"
    270.         else:
    271.             send "{@prefix}&7You must use &c/unban <player>"
    272. on tab completer for "/unban":
    273.     loop {bans::*}:
    274.         add "%loop-value%" to completions
    275. #=====================#
    276. #         MUTE        #
    277. #=====================#
    278. command /mute [<offlineplayer>] [<text={@default mute reason}>]:
    279.     permission: sb.mute
    280.     permission message: {@prefix}&cYou don't have permission to do this!
    281.     executable by: console and player
    282.     trigger:
    283.         if arg 1 is set:
    284.             if arg 1 is online:
    285.                 if arg 2 is set:
    286.                     if {sban.muted.%arg 1%} is true:
    287.                         send "{@prefix}&7This player is already muted"
    288.                     else:
    289.                         if arg 1 has permission "sb.mute.exempt":
    290.                             send "{@prefix}&7This player can't be muted"
    291.                         else:
    292.                             add arg 1 to {mutes::*}
    293.                             set {sban.muted.%arg 1%} to true
    294.                             set {sban.mutedon.%arg 1%} to now
    295.                             set {sban.mutereason.%arg 1%} to arg 2
    296.                             set {sban.muteexpire.%arg 1%} to "Never"
    297.                             set {sban.mutedby.%arg 1%} to "%sender%"
    298.                             loop all players:
    299.                                 if loop-player has permission "sb.mute.notify":
    300.                                     if {notify.%loop-player%} is true:
    301.                                         send "{@prefix}&7I have handled a &a&lNEW MUTE&r&7!" to loop-player
    302.                                         send "" to loop-player
    303.                                         send " &7Player muted &8» &e%arg 1%" to loop-player
    304.                                         send " &7Muted by &8» &a%sender%" to loop-player
    305.                                         send " &7Mute reason &8» &7'&a%arg 2%&7'" to loop-player
    306.                                         send " &7Autounmute &8» &aNever" to loop-player
    307.                             send "{@prefix}&7You are now &a&lMUTED&r&7!" to arg 1
    308.                             send "" to arg 1
    309.                             send " &7Muted by &8» &a%sender%" to arg 1
    310.                             send " &7Mute reason &8» &7'&a%arg 2%&7'" to arg 1
    311.                             send " &7Autounmute &8» &aNever" to arg 1
    312.                             send "{@prefix}&a%sender% &7muted &e%arg 1% &7('&a%arg 2%&7') &7- (&aNever&7)" to console
    313.                 else:
    314.                     send "{@prefix}&7You must use &c/mute <player> <reason>"
    315.             else:
    316.                 send "{@prefix}&7This player is not online"
    317.         else:
    318.             send "{@prefix}&7You must use &c/mute <player> <reason>"
    319. #=====================#
    320. #       UNMUTE        #
    321. #=====================#
    322. command /unmute [<offlineplayer>]:
    323.     permission: sb.unmute
    324.     permission message: {@prefix}&cYou don't have permission to do this!
    325.     executable by: console and player
    326.     trigger:
    327.         if arg 1 is set:
    328.             if {sban.muted.%arg 1%} is true:
    329.                 remove arg 1 from {mutes::*}
    330.                 set {sban.muted.%arg 1%} to false
    331.                 set {sban.mutedon.%arg 1%} to "-"
    332.                 set {sban.mutereason.%arg 1%} to "-"
    333.                 set {sban.muteexpire.%arg 1%} to "-"
    334.                 set {sban.mutedby.%arg 1%} to "-"
    335.                 delete {muteexpire.%arg 1%}
    336.                 loop all players:
    337.                     if loop-player has permission "sb.unmute.notify":
    338.                         if {notify.%loop-player%} is true:
    339.                             send "{@prefix}&7I have handled an &a&lUNMUTE&r&7!" to loop-player
    340.                             send "" to loop-player
    341.                             send " &7Player unmuted &8» &e%arg 1%" to loop-player
    342.                             send " &7Unmuted by &8» &a%sender%" to loop-player
    343.                 send "{@prefix}&7You are now &a&lUNMUTED&r&7!" to arg 1
    344.                 send "" to arg 1
    345.                 send " &7Unmuted by &8» &a%sender%" to arg 1
    346.                 send "{@prefix}&a%sender% &7unmuted &e%arg 1%" to console
    347.             else:
    348.                 send "{@prefix}&7This player is not muted"
    349.         else:
    350.             send "{@prefix}&7You must use &c/unmute <player>"
    351. on tab completer for "/unmute":
    352.     loop {mutes::*}:
    353.         add "%loop-value%" to completions
    354. #=====================#
    355. #         KICK        #
    356. #=====================#
    357. command /kick [<player>] [<text={@default kick reason}>]:
    358.     permission: sb.kick
    359.     permission message: {@prefix}&cYou don't have permission to do this!
    360.     executable by: console and player
    361.     trigger:
    362.         if arg 1 is set:
    363.             if arg 1 is online:
    364.                 if arg 2 is set:
    365.                     if arg 1 has permission "sb.kick.exempt":
    366.                         send "{@prefix}&7This player can't be kicked"
    367.                     else:
    368.                         set {sban.kicked.%arg 1%} to true
    369.                         set {sban.kickreason.%arg 1%} to arg 2
    370.                         set {sban.kickedby.%arg 1%} to "%sender%"
    371.                         set {_p} to arg 1
    372.                         kick arg 1 due to "{@kick message}"
    373.                         loop all players:
    374.                             if loop-player has permission "sb.kick.notify":
    375.                                 if {notify.%loop-player%} is true:
    376.                                     send "{@prefix}&7I have handled a &a&lNEW KICK&r&7!" to loop-player
    377.                                     send "" to loop-player
    378.                                     send " &7Player kicked &8» &e%arg 1%" to loop-player
    379.                                     send " &7Kicked by &8» &a%sender%" to loop-player
    380.                                     send " &7Kick reason &8» &7'&a%arg 2%&7'" to loop-player
    381.                         send "{@prefix}&a%sender% &7kicked &e%arg 1% &7('&a%arg 2%&7')" to console
    382.                 else:
    383.                     send "{@prefix}&7You must use &c/kick <player> <reason>"
    384.             else:
    385.                 send "{@prefix}&7This player is not online"
    386.         else:
    387.             send "{@prefix}&7You must use &c/kick <player> <reason>"
    388. #=====================#
    389. #       KICKALL       #
    390. #=====================#
    391. command /kickall [<text={@default kickall reason}>]:
    392.     permission: sb.kickall
    393.     permission message: {@prefix}&cYou don't have permission to do this!
    394.     executable by: console and player
    395.     trigger:
    396.         if arg 1 is set:
    397.             loop all players:
    398.                 if loop-player has permission "sb.kickall.exempt":
    399.                     if loop-player has permission "sb.kickall.notify":
    400.                         if {notify.%loop-player%} is true:
    401.                             send "{@prefix}&7I have handled a &a&lNEW KICKALL&r&7!" to loop-player
    402.                             send "" to loop-player
    403.                             send " &7Players kicked &8» &eAll without permission" to loop-player
    404.                             send " &7Kicked by &8» &a%sender%" to loop-player
    405.                             send " &7Kick reason &8» &7'&a%arg 1%&7'" to loop-player
    406.                 else:
    407.                     set {sban.kickedby.%loop-player%} to "%sender%"
    408.                     set {sban.kickreason.%loop-player%} to arg 1
    409.                     set {sban.kickall} to loop-player
    410.                     set {sban.kicked.%loop-value%} to true
    411.                     set {_p} to loop-player
    412.                     kick {sban.kickall} due to "{@kickall message}"
    413.                     delete {sban.kickall}
    414.                 send "{@prefix}&a%sender% &7kicked all players without permission &7('&a%arg 1%&7')" to console
    415.         else:
    416.             send "{@prefix}&7You must use &c/kickall <reason>"
    417. #=====================#
    418. #         WARN        #
    419. #=====================#
    420. command /warn [<offlineplayer>]:
    421.     permission: sb.warn
    422.     permission message: {@prefix}&cYou don't have permission to do this!
    423.     executable by: console and player
    424.     trigger:
    425.         if arg 1 is set:
    426.             if arg 1 is online:
    427.                 if arg 1 has permission "sb.warn.exempt":
    428.                     send "{@prefix}&7This player can't be warned"
    429.                 else:
    430.                     if {sban.warns.%arg 1%} = {@max warns}:
    431.                         set {sban.warnedby.%arg 1%} to "%sender%"
    432.                         add 1 to {sban.warns.%arg 1%}
    433.                         set {sban.kicked.%arg 1%} to true
    434.                         set {_p} to arg 1
    435.                         kick arg 1 due to "{@max warns message}"
    436.                         loop all players:
    437.                             if loop-player has permission "sb.maxwarn.notify":
    438.                                 if {notify.%loop-player%} is true:
    439.                                     send "{@prefix}&7I have handled a &a&lNEW WARN&r&7!" to loop-player
    440.                                     send "" to loop-player
    441.                                     send " &7Player warned &8» &e%arg 1%" to loop-player
    442.                                     send " &7Warned by &8» &a%sender%" to loop-player
    443.                                     send " &7This player had &8» &a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns" to loop-player
    444.                                     send " &7This player has been kicked for reaching &a{@max warns} &7warns" to loop-player
    445.                         send "{@prefix}&a%sender% &7warned &e%arg 1% &7(&a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns) - (&aKicked&7)" to console
    446.                         set {sban.warns.%arg 1%} to 1
    447.                         set {sban.warnedby.%arg 1%} to "-"
    448.                     else:
    449.                         if {sban.warns.%arg 1%} is not set:
    450.                             set {sban.warns.%arg 1%} to 1
    451.                             set {sban.warnedby.%arg 1%} to "%player%"
    452.                             loop all players:
    453.                                 if loop-player has permission "sb.warn.notify":
    454.                                     if {notify.%loop-player%} is true:
    455.                                         send "{@prefix}&7I have handled a &a&lNEW WARN&r&7!" to loop-player
    456.                                         send "" to loop-player
    457.                                         send " &7Player warned &8» &e%arg 1%" to loop-player
    458.                                         send " &7Warned by &8» &a%sender%" to loop-player
    459.                                         send " &7This player has &8» &a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns" to loop-player
    460.                             send "{@prefix}&7You have been &a&lWARNED&r&7!" to arg 1
    461.                             send "" to arg 1
    462.                             send " &7Warned by &8» &a%sender%" to arg 1
    463.                             send " &7You have &8» &a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns" to arg 1
    464.                             send "{@prefix}&a%sender% &7warned &e%arg 1% &7(&a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns)" to console
    465.                         else:
    466.                             set {sban.warns.%arg 1%} to {sban.warns.%arg 1%} + 1
    467.                             set {sban.warnedby.%arg 1%} to "%player%"
    468.                             loop all players:
    469.                                 if loop-player has permission "sb.warn.notify":
    470.                                     if {notify.%loop-player%} is true:
    471.                                         send "{@prefix}&7I have handled a &a&lNEW WARN&r&7!" to loop-player
    472.                                         send "" to loop-player
    473.                                         send " &7Player warned &8» &e%arg 1%" to loop-player
    474.                                         send " &7Warned by &8» &a%sender%" to loop-player
    475.                                         send " &7This player has &8» &a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns" to loop-player
    476.                             send "{@prefix}&7You have been &a&lWARNED&r&7!" to arg 1
    477.                             send "" to arg 1
    478.                             send " &7Warned by &8» &a%sender%" to arg 1
    479.                             send " &7You have &8» &a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns" to arg 1
    480.                             send "{@prefix}&a%sender% &7warned &e%arg 1% &7(&a%{sban.warns.%arg 1%} - 1%&7/&a{@max warns} &7warns)" to console
    481.             else:
    482.                 send "{@prefix}&7This player is not online"
    483.         else:
    484.             send "{@prefix}&7You must use &c/warn <player>"
    485. #=====================#
    486. #        CHECK        #
    487. #=====================#
    488. command /check [<offlineplayer>]:
    489.     permission: sb.check
    490.     permission message: {@prefix}&cYou don't have permission to do this!
    491.     executable by: console and player
    492.     trigger:
    493.         if arg 1 is set:
    494.             if {sban.firstjoin.%arg 1%} is not set:
    495.                 set {sban.firstjoin.%arg 1%} to "no"
    496.                 send "{@prefix}&7This player has not joined"
    497.                 stop
    498.             if {sban.firstjoin.%arg 1%} is "no":
    499.                 send "{@prefix}&7This player has not joined"
    500.                 stop
    501.             else:
    502.                 send " &8&m-------------------------------"
    503.                 send " {@prefix}&7Checking &a%arg 1%"
    504.                 send ""
    505.                 send " &7Has joined &8» &c%{sban.firstjoin.%arg 1%}%"
    506.                 send " &7Banned &8» &c%{sban.banned.%arg 1%}%"
    507.                 send " &7IP Banned &8» &c%{sban.banip.%arg 1%}%"
    508.                 send " &7Banned by &8» &c%{sban.bannedby.%arg 1%}%"
    509.                 send " &7Ban reason &8» &c%{sban.banreason.%arg 1%}%"
    510.                 send " &7Banned on &8» &c%{sban.bannedon.%arg 1%}%"
    511.                 send " &7Autounban &8» &c%{sban.banexpire.%arg 1%}%"
    512.                 send " &7Muted &8» &c%{sban.muted.%arg 1%}%"
    513.                 send " &7Muted by &8» &c%{sban.mutedby.%arg 1%}%"
    514.                 send " &7Mute reason &8» &c%{sban.mutereason.%arg 1%}%"
    515.                 send " &7Muted on &8» &c%{sban.mutedon.%arg 1%}%"
    516.                 send " &7Autounmute &8» &c%{sban.muteexpire.%arg 1%}%"
    517.                 send " &7Warns &8» &c%{sban.warns.%arg 1%} - 1%&7/&c{@max warns}"
    518.                 if sender is player:
    519.                     send " &7UUID &8» &c%UUID of player%"
    520.                     send " &7IP &8» &c%IP address of player%"
    521.                     send " &8&m-------------------------------"
    522.                 else:
    523.                     send " &8&m-------------------------------"
    524.                     stop
    525.         else:
    526.             send "{@prefix}&7You must use &c/check <player>"
    527. #=====================#
    528. #         BANS        #
    529. #=====================#
    530. command /bans [<integer=1>]:
    531.     permission: sb.bans
    532.     permission message: {@prefix}&cYou don't have permission to do this!
    533.     executable by: console and player
    534.     trigger:
    535.         sender is console:
    536.             send "{@prefix}&7This command is only available for players"
    537.         else:
    538.             set {sizeofbans::*} to size of {bans::*}
    539.             set {_page::max} to arg 1 * 45
    540.             set {_page::min} to (arg 1 - 1) * 45
    541.             set {_page::posts} to 0
    542.             set {_page::count} to 0
    543.             set {_page::number} to arg 1
    544.             set {_pages} to size of {bans::*} / 45
    545.             set {_pages} to "%{_pages}%"
    546.             set {_pages::*} to {_pages} split at "."
    547.             set {_page::total} to {_pages::1}
    548.             if {_pages::2} is set:
    549.                 set {_page::total} to {_page::total} parsed as an integer
    550.                 add 1 to {_page::total}
    551.             if inventory name of player's current inventory does not contain "&0List of banned players":
    552.                 open chest with 6 rows named "&0List of banned players %{_page::number}%/%{_page::total}%" to player
    553.             else:
    554.                 loop 54 times:
    555.                     set slot (loop-number - 1) of player's current inventory to air
    556.                 set inventory name of player's current inventory to "&0List of banned players %{_page::number}%/%{_page::total}%"
    557.             if {_page::number} is less than 2:
    558.                 set slot 45 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    559.                 set slot 46 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    560.                 set slot 47 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    561.                 set slot 48 of player's current inventory to book and quill named "&eBasic information" with lore "||&7Banned users &8» &c%{sizeofbans::*}%||||&7Page &8» &c%{_page::number}%&7/&c%{_page::total}%" with all removed NBT
    562.                 set slot 49 of player's current inventory to stone button named "&eRefresh GUI" with lore "||&7Click here to refresh the gui without||&7loosing the page you are viewing" with all removed NBT
    563.                 set slot 50 of player's current inventory to name tag named "&eSearch players" with lore "||&7Click here to &csearch &7banned players.||&7Type player's name in chat to proceed" with all removed NBT
    564.                 set slot 51 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    565.                 set slot 52 of player's current inventory to barrier named "&eClose GUI" with all removed NBT
    566.                 set slot 53 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    567.             else:
    568.                 set slot 45 of player's current inventory to arrow named "&ePrevious Page" with all removed NBT
    569.                 set slot 46 of player's current inventory to book named "&eMain Page" with all removed NBT
    570.                 set slot 47 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    571.                 set slot 48 of player's current inventory to book and quill named "&eBasic information" with lore "||&7Banned users &8» &c%{sizeofbans::*}%||||&7Page &8» &c%{_page::number}%&7/&c%{_page::total}%" with all removed NBT
    572.                 set slot 49 of player's current inventory to stone button named "&eRefresh GUI" with lore "||&7Click here to refresh the gui without||&7loosing the page you are viewing" with all removed NBT
    573.                 set slot 50 of player's current inventory to name tag named "&eSearch players" with lore "||&7Click here to &csearch &7banned players.||&7Type player's name in chat to proceed" with all removed NBT
    574.                 set slot 51 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    575.                 set slot 52 of player's current inventory to barrier named "&eClose GUI" with all removed NBT
    576.                 set slot 53 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    577.             loop {bans::*}:
    578.                 if {_page::posts} is less than {_page::max}:
    579.                     if {_page::count} is greater than or equal to {_page::min}:
    580.                         if {sban.warns.%loop-value%} is not set:
    581.                             set {sban.warns.%arg 1%} to 1
    582.                         set slot {_page::posts} of player's current inventory to loop-value's skull named "&7Player &8» &e%loop-value%" with lore "||&7&oClick here to unban this player||||&7Ban ID &8» &7(&b##%loop-index%&7)||||&7Banned by &8» &a%{sban.bannedby.%loop-value%}%||&7IP Banned &8» &a%{sban.banip.%loop-value%}%||&7Banned on &8» &a%{sban.bannedon.%loop-value%}%||&7Autounban &8» &a%{sban.banexpire.%loop-value%}%||&7Warns &8» &c%{sban.warns.%arg 1%} - 1%&7/&c{@max warns}||||&7Do &c/check %loop-value% &7to view||&7more info about this player||&7" with all removed NBT
    583.                         add 1 to {_page::posts}
    584.                 add 1 to {_page::count}
    585.             if {_page::number} is less than {_page::total}:
    586.                 set slot 45 of player's current inventory to arrow named "&ePrevious Page" with all removed NBT
    587.                 set slot 46 of player's current inventory to book named "&eMain Page" with all removed NBT
    588.                 set slot 47 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    589.                 set slot 48 of player's current inventory to book and quill named "&eBasic information" with lore "||&7Banned users &8» &c%{sizeofbans::*}%||||&7Page &8» &c%{_page::number}%&7/&c%{_page::total}%" with all removed NBT
    590.                 set slot 49 of player's current inventory to stone button named "&eRefresh GUI" with lore "||&7Click here to refresh the gui without||&7loosing the page you are viewing" with all removed NBT
    591.                 set slot 50 of player's current inventory to name tag named "&eSearch players" with lore "||&7Click here to &csearch &7banned players.||&7Type player's name in chat to proceed" with all removed NBT
    592.                 set slot 51 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    593.                 set slot 52 of player's current inventory to barrier named "&eClose GUI" with all removed NBT
    594.                 set slot 53 of player's current inventory to arrow named "&eNext Page" with all removed NBT
    595.             if {_page::count} is 0:
    596.                 open chest with 1 row named "&0There are %{_page::count}% banned players" to player
    597.                 set slot 0 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    598.                 set slot 1 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    599.                 set slot 2 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    600.                 set slot 3 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    601.                 set slot 4 of player's current inventory to book named "&eThere aren't banned players" with lore "||&7Banned players will apear in this||&7gui. You will be able to manage||&c&lSuperBan&r&7's commands from here!" with all removed NBT
    602.                 set slot 5 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    603.                 set slot 6 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    604.                 set slot 7 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    605.                 set slot 8 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    606. command /bansconfirm [<offlineplayer>]:
    607.     permission: sb.bansconfirm
    608.     permission message: {@prefix}&cYou don't have permission to do this!
    609.     executable by: console and player
    610.     trigger:
    611.         sender is console:
    612.             send "{@prefix}&7This command is only available for players"
    613.         else:
    614.             if arg 1 is not set:
    615.                 stop
    616.             else:
    617.                 if {bans::*} is not set:
    618.                     send "{@prefix}&7There aren't banned players"
    619.                 else:
    620.                     loop {bans::*}:
    621.                         if loop-value = arg 1:
    622.                             open chest with 1 row named "&0You must confirm to unban him" to player
    623.                             set slot 0 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    624.                             set slot 1 of player's current inventory to book named "&eMain Page" with lore "||&7Click here to go to bans page" with all removed NBT
    625.                             set slot 2 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    626.                             set slot 3 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    627.                             set slot 4 of player's current inventory to loop-value's skull named "&7Player &8» &e%loop-value%" with lore "||&7&oAre you shure to unban this player?||||&7Ban ID &8» &7(&b##%loop-index%&7)||||&7Banned by &8» &a%{sban.bannedby.%loop-value%}%||&7IP Banned &8» &a%{sban.banip.%loop-value%}%||&7Banned on &8» &a%{sban.bannedon.%loop-value%}%||&7Autounban &8» &a%{sban.banexpire.%loop-value%}%||&7Warns &8» &c%{sban.warns.%arg 1%} - 1%&7/&c{@max warns}||||&7Do &c/check %loop-value% &7to view||&7more info about this player||&7" with all removed NBT
    628.                             set slot 5 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    629.                             set slot 6 of player's current inventory to light green stained glass pane named "&7Unban &8» &a%loop-value%" with all removed NBT
    630.                             set slot 7 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    631.                             set slot 8 of player's current inventory to black stained glass pane named "&7" with all removed NBT
    632. #=====================#
    633. #        EVENTS       #
    634. #=====================#
    635. on inventory click:
    636.     if inventory name of player's current inventory contains "&0There are":
    637.         cancel event
    638.     if inventory name of player's current inventory contains "&0List of banned players":
    639.         cancel event
    640.         set {_page} to "%inventory name of player's current inventory%"
    641.         replace all "&0List of banned players " in {_page} with ""
    642.         set {_pages::*} to {_page} split at "/"
    643.         if clicked slot is less than 45:
    644.             if clicked item is player head:
    645.                 if name of item contains "&7Player":
    646.                     set {_playername} to "%clicked item's name%"
    647.                     replace all "&7Player &8» &e" in {_playername} with ""
    648.                     execute player command "/bansconfirm %{_playername}%"
    649.         if clicked slot is 45:
    650.             if clicked item's name is "&ePrevious Page":
    651.                 if {_pages::1} parsed as an integer is greater than 1:
    652.                     execute player command "/bans %{_pages::1} parsed as an integer - 1%"
    653.                 else:
    654.                     close player's inventory
    655.         if clicked slot is 46:
    656.             execute player command "/bans"
    657.         if clicked slot is 49:
    658.             execute player command "/bans %{_pages::1} parsed as an integer%"
    659.         if clicked slot is 50:
    660.             if clicked item's name is "&eSearch players":
    661.                 close player's inventory
    662.                 set {bans.chat::%player%} to true
    663.                 send "{@prefix}&7You must write the player's name in chat. Type &ccancel &7to annullate the search."
    664.         if clicked slot is 52:
    665.             close player's inventory
    666.         if clicked slot is 53:
    667.             if clicked item's name is "&eNext Page":
    668.                 execute player command "/bans %{_pages::1} parsed as an integer + 1%"
    669.     if inventory name of player's current inventory contains "&0You must confirm to unban him":
    670.         cancel event
    671.         if clicked slot is 1:
    672.             execute player command "/bans"
    673.         if clicked slot is 6:
    674.             set {_playername} to "%clicked item's name%"
    675.             replace all "&7Unban &8» &a" in {_playername} with ""
    676.             execute player command "/unban %{_playername}%"
    677.             if {@keep unban gui open} is false:
    678.                 close player's inventory
    679.             else if {@keep unban gui open} is true:
    680.                 execute player command "/bans"
    681. on command:
    682.     if {sban.muted.%player%} is true:
    683.         if command is {@dissallowed muted cmds}:
    684.             cancel event
    685.             send "{@prefix}&7This command is not allowed as you are muted!"
    686. on chat:
    687.     if {bans.chat::%player%} is true:
    688.         cancel event
    689.         set {_search} to "%message%" parsed as offline player
    690.         if {_search} is "cancel":
    691.             delete {bans.chat::%player%}
    692.             send "{@prefix}&7You have succesfully annullated the search."
    693.         else:
    694.             if {sban.banned.%{_search}%} is not set:
    695.                 send "{@prefix}&7This player is not banned"
    696.                 delete {bans.chat::%player%}
    697.             else:
    698.                 if {sban.banned.%{_search}%} is true:
    699.                     delete {bans.chat::%player%}
    700.                     execute player command "/bansconfirm %{_search}%"
    701.                 else:
    702.                     delete {bans.chat::%player%}
    703.                     send "{@prefix}&7This player is not banned"
    704.     if {sban.muted.%player%} is true:
    705.         player has permission "sb.unmute-on-chat":
    706.             set {sban.muted.%player%} to false
    707.             set {sban.mutedon.%player%} to "-"
    708.             set {sban.mutereason.%player%} to "-"
    709.             set {sban.muteexpire.%player%} to "-"
    710.             set {sban.mutedby.%player%} to "-"
    711.             stop
    712.         else:
    713.             cancel event
    714.             send "{@prefix}&7You can't talk while muted!"
    715. on quit:
    716.     if {sban.banned.%player%} is true:
    717.         set leave message to ""
    718.     if {sban.kicked.%player%} is true:
    719.         set leave message to ""
    720.         delete {sban.kicked.%player%}
    721. on skript start:
    722. #    if {bans::*} is not set:
    723. #        set {startupbans::*} to 0
    724. #    else:
    725. #        set {2::*} to {startupbans::*}
    726.     send "&r[&rSuperBans&r] Enabling SuperBans." to console
    727.     wait 1 second
    728.     send "&8&m========================================" to console
    729.     send " &cSuperBans &8- &7SuperBans has been loaded!" to console
    730.     send "       &bSkript Created by &aKroterPvP" to console
    731.     send "" to console
    732. #    send "    &7Loaded a total of &a%{startupbans::*}% &7banned users." to console
    733.     send "&8&m========================================" to console
    734. on connect:
    735.     if {sban.banned.%player%} is true:
    736.         player has permission "sb.unban-on-join":
    737.             set {sban.banned.%player%} to false
    738.             set {sban.bannedon.%player%} to "-"
    739.             set {sban.banreason.%player%} to "-"
    740.             set {sban.banexpire.%player%} to "-"
    741.             set {sban.bannedby.%player%} to "-"
    742.             set {sban.banip.%player%} to false
    743.             remove player from {bans::*}
    744.         else:
    745.             if {sban.banexpire.%player%} is "Never":
    746.                 set {_p} to player
    747.                 kick player due to "{@ban screen message}"
    748.                 loop all players:
    749.                     if loop-player has permission "sb.banned-tried-to-join":
    750.                         send "{@prefix}&e%player% &7is banned an tried to join." to loop-player
    751.                 send "{@prefix}&e%player% &7is banned an tried to join." to console
    752.             else:
    753.                 set {_p} to player
    754.                 kick player due to "{@tempban screen message}"
    755.                 loop all players:
    756.                     if loop-player has permission "sb.tempbanned-tried-to-join":
    757.                         send "{@prefix}&e%player% &7is tempbanned an tried to join." to loop-player
    758.                 send "{@prefix}&e%player% &7is tempbanned an tried to join." to console
    759.     player has permission "sb.notify":
    760.         if {notify.%player%} is not set:
    761.             set {notify.%player%} to true
    762.     if {sban.firstjoin.%player%} is not set:
    763.         set {sban.firstjoin.%player%} to "yes"
    764.     if {sban.banned.%player%} is not set:
    765.         set {sban.banned.%player%} to false
    766.     if {sban.banip.%player%} is not set:
    767.         set {sban.banip.%player%} to false
    768.     if {sban.bannedby.%player%} is not set:
    769.         set {sban.bannedby.%player%} to "-"
    770.     if {sban.banreason.%player%} is not set:
    771.         set {sban.banreason.%player%} to "-"
    772.     if {sban.bannedon.%player%} is not set:
    773.         set {sban.bannedon.%player%} to "-"
    774.     if {sban.banexpire.%player%} is not set:
    775.         set {sban.banexpire.%player%} to "-"
    776.     if {sban.muted.%player%} is not set:
    777.         set {sban.muted.%player%} to false
    778.     if {sban.mutedby.%player%} is not set:
    779.         set {sban.mutedby.%player%} to "-"
    780.     if {sban.mutereason.%player%} is not set:
    781.         set {sban.mutereason.%player%} to "-"
    782.     if {sban.muteexpire.%player%} is not set:
    783.         set {sban.muteexpire.%player%} to "-"
    784.     if {sban.mutedon.%player%} is not set:
    785.         set {sban.mutedon.%player%} to "-"
    786.     if {sban.warns.%player%} is not set:
    787.         set {sban.warns.%player%} to 1
    788.     if {sban.warnedby.%player%} is not set:
    789.         set {sban.warnedby.%player%} to "-"
    790. #=====================#
    791. #  REMOVED COMMANDS   #
    792. #=====================#
    793. command /banlist:
    794.     trigger:
    795.         send "{@unknown cmd message}"
    796. command /ban-ip [<text>]:
    797.     trigger:
    798.         send "{@unknown cmd message}"
    799. command /pardon [<text>]:
    800.     trigger:
    801.         send "{@unknown cmd message}"
    802. command /pardon-ip [<text>]:
    803.     trigger:
    804.         send "{@unknown cmd message}"
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    I can't reproduce this. Aside from your code, I set up two little test commands to add to the list and send the list in chat, and even after restarting my list displays the same. I do run a different version, so maybe that's the issue? I wouldn't think so, but I'm on 2.2 dev 29.
    Code (Skript):
    1. command /testban [<offline player>]:
    2.     trigger:
    3.         add arg 1 to {bans::*}
    4.         send "added %arg 1%"
    5.        
    6. command /testlist:
    7.     trigger:
    8.         send "%{bans::*}%"
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    I don't think that the issue is caused by a different version, but It can be. I'm running 2.2 dev-27 couse I'm in 1.8.8 and the other versions aren't running on that version.
    I've tried creating a new loop variable, adding avalue, restarting the server and the values aren't lost

    Could be a code error?
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Yeah some sort of error or weird bug maybe. Only local variables should be lost on restart
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Idk why the variable loses its values...
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    I can't properly test it but here's an idea. in your full skript right after the argument gets added to the list have you tried putting in a test message to make sure the issue isn't it not getting properly added? something maybe like
    Code (Skript):
    1. add arg 1 to {Bans::*}
    2. send "%{Bans::*}%"
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Yes, I've tried it. Download the skript and try it yourself. You will need SkQuerry and Skellet (and bensku's dev 27) I code it in a 1.8.8 server, so try it on that version. Ban a player and run /bans. A gui with the name of the player will apear. Stop and join again to the server and do /bans, the bannes player will be displayed as null.
    --- Double Post Merged, Jul 24, 2017, Original Post Date: Jul 23, 2017 ---
    The error is still here and I don't know what is causing it. Can somebody please help?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...