Warns 1.0

Warn your players with Skript !

  1. FJouk
    Tested Minecraft Versions:
    • 1.8
    Contributors:
    FJouk
    Warns.png

    Warn your players through the new Warn system. Each player gets three warn gets tempban for 15 minutes.


    Warns.png

    /warn help - Open help menu
    /warn warn - Warn a player
    /warn check - Check player's warns
    /warn reset - Reset player's warns


    Warns.png

    warn.warn - /warn warn
    warn.check - /warn check
    warn.reset - /warn reset


    Warns.png

    Code (Text):
    #---------------------------------------
    #                 WARNS
    #           Created by FJouk
    #---------------------------------------
    #DO NOT EDIT THIS CODE (ONLY MESSAGES, CONFIG AND PERMISSIONS)!
    #-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
    options:
    #------------
    #    CONFIG     |
    #------------

        #Main command (Default: warn)
        cmd.main: warn
       
        #Prefix (Default: &6[&eWARNS&6]&r)
        prefix: &6[&eWARNS&6]&r
       
        #If a player has 3 warnings, how long it ban ? (Default: 15m)
        ban: 15m
       
    #------------
    #    MESSAGES |
    #------------  
        player.noperm: &cYou don't have permission to use this command
        many.warnings: &cAlready you has got 3 warnings
        no.warnings: &7The player didn't get any warnings
       
        admin.warn: &6Admin &c%player% &6has warned &c%player-argument% &6for &c'%arg 3%'    #This is broadcast
        player.warn: &6You now have &c%{warns::%player-argument%}% &6warnings                #This is message for warned player
       
        player.howmanywarning: &7Player now have %{warns::%player-argument%}% warnings
       
        admin.reset: &6Admin &c%player% &6has reseted &c%player-argument%'s &6warnings
        player.reset: &6Your warnings has been reseted
       
       
       
    #------------
    # PERMISSIONS |
    #------------

        #/warn warn command
        perm.warn: warn.warn
       
        #/warn check command
        perm.check: warn.check
       
        #/warn reset command
        perm.reset: warn.reset
       

    #------------
    #    CODE     |
    #------------

    command /{@cmd.main} <text> [<player>] [<text>]:
        usage: &c/{@cmd.main} help
        trigger:
            if arg 1 is "help":
                message "&e&m-----------------------------------------------------"
                message "&e&l                                          &nWARNS"
                message ""
                message "&a/{@cmd.main} help &f- &6Commands"
                message "&a/{@cmd.main} warn <player> <reason> &f- &6Warn a player"
                message "&a/{@cmd.main} check <player> &f- &6Check player's past warnings"
                message "&a/{@cmd.main} reset <player> &f- &6Reset player's warnings"
                message "&e&m-----------------------------------------------------"
            if arg 1 is "warn":
                if player has permission "perm.warn":
                    add 1 to {warns::%player-argument%}
                    wait 1 tick
                    if {warns::%player-argument%} is 1:
                        set {warns::1::reason::%player-argument%} to "%arg 3%"
                        set {warns::1::date::%player-argument%} to now
                        set {warns::1::sender::%player-argument%} to "%player%"
                    else if {warns::%player-argument%} is 2:
                        set {warns::2::reason::%player-argument%} to "%arg 3%"
                        set {warns::2::date::%player-argument%} to now
                        set {warns::2::sender::%player-argument%} to "%player%"
                    else if {warns::%player-argument%} is 3:
                        set {warns::3::reason::%player-argument%} to "%arg 3%"
                        set {warns::3::date::%player-argument%} to now
                        set {warns::3::sender::%player-argument%} to "%player%"
                    wait 1 tick
                    broadcast "{@prefix} {@admin.warn}"
                    message "{@prefix} {@player.warn}" to player-argument
                    wait 1 tick
                    if {warns::%player-argument%} is 3:
                        execute console command "essentials:tempban %player% {@ban} {@many.warnings}"
                        delete {warns::1::reason::%player-argument%}          
                        delete {warns::1::sender::%player-argument%}          
                        delete {warns::1::date::%player-argument%}          
                        delete {warns::2::reason::%player-argument%}          
                        delete {warns::2::sender::%player-argument%}          
                        delete {warns::2::date::%player-argument%}          
                        delete {warns::3::reason::%player-argument%}          
                        delete {warns::3::sender::%player-argument%}          
                        delete {warns::3::date::%player-argument%}
                        delete {warns::%player-argument%}                
            if arg 1 is "check":
                if player has permission "perm.check":
                    if {warns::%player-argument%} is not set:
                        message "{@prefix} {@no.warnings}"
                    else if {warns::%player-argument%} is 1:
                        message "&6%player-argument%'s warnings"
                        message "   {@player.howmanywarning}"
                        message "   &61. warning:"
                        message "        &eReason: &c%{warns::1::reason::%player-argument%}%"
                        message "        &eDate: &c%{warns::1::date::%player-argument%}%"
                        message "        &eSender: &c%{warns::1::sender::%player-argument%}%"
                    else if {warns::%player-argument%} is 2:
                        message "&6%player-argument%'s warnings"
                        message "   {@player.howmanywarning}"
                        message "   &61. warning:"
                        message "        &eReason: &c%{warns::1::reason::%player-argument%}%"
                        message "        &eDate: &c%{warns::1::date::%player-argument%}%"
                        message "        &eSender: &c%{warns::1::sender::%player-argument%}%"
                        message "   &62. warning:"
                        message "        &eReason: &c%{warns::2::reason::%player-argument%}%"
                        message "        &eDate: &c%{warns::2::date::%player-argument%}%"
                        message "        &eSender: &c%{warns::2::sender::%player-argument%}%"
                    else if {warns::%player-argument%} is 3:  
                        message "&6%player-argument%'s warnings"
                        message "   {@player.howmanywarning}"
                        message "   &61. warning:"
                        message "        &eReason: &c%{warns::1::reason::%player-argument%}%"
                        message "        &eDate: &c%{warns::1::date::%player-argument%}%"
                        message "        &eSender: &c%{warns::1::sender::%player-argument%}%"
                        message "   &62. warning:"
                        message "        &eReason: &c%{warns::2::reason::%player-argument%}%"
                        message "        &eDate: &c%{warns::2::date::%player-argument%}%"
                        message "        &eSender: &c%{warns::2::sender::%player-argument%}%"  
                        message "   &63. warning:"
                        message "        &eReason: &c%{warns::3::reason::%player-argument%}%"
                        message "        &eDate: &c%{warns::3::date::%player-argument%}%"
                        message "        &eSender: &c%{warns::3::sender::%player-argument%}%"                  
            if arg 1 is "reset":
                if player has permission "perm.reset":
                    delete {warns::1::reason::%player-argument%}          
                    delete {warns::1::sender::%player-argument%}          
                    delete {warns::1::date::%player-argument%}          
                    delete {warns::2::reason::%player-argument%}          
                    delete {warns::2::sender::%player-argument%}          
                    delete {warns::2::date::%player-argument%}          
                    delete {warns::3::reason::%player-argument%}          
                    delete {warns::3::sender::%player-argument%}          
                    delete {warns::3::date::%player-argument%}
                    delete {warns::%player-argument%}
                    message "{@prefix} {@player.reset}" to player-argument
                    broadcast "{@prefix} {@admin.reset}"
                   
               
               
               



    Warns.png

    Skript - http://dev.bukkit.org/bukkit-plugins/skript/

    Essentials - https://www.spigotmc.org/resources/essentialsx.9089/


    Warns.png

    The skript file named "Warn" is full property of "FJouk" and protected under Czech Republic copyright laws. The author doesn't allow the total or partial redistribution of this plugin. Also the author doesn't allow any decompilation (or reverse-engineering) and modification of the code. The final user cannot resell or make money of any form with total or partial code or resources from this plugin. The final user is allowed to install this plugin in more than one server.


    Warns.png

    [​IMG] [​IMG]