Spigot [Skript] [Free] Night Vision 1.3

Get Night Vision with a simple command

  1. MPF

    MPF

    MPF submitted a new resource:

    [Skript] [Free] Night Vision - Get Night Vision with a simple command

    Read more about this resource...
     
  2. MPF

    MPF

  3. MPF

    MPF

  4. MPF

    MPF

  5. I added the ability to give Night Vision to other people and made a few adjustments, you can add the code to your script if you wish... Adjustments I've made are removed all the messages (didn't like them in my opinion) when you do an action, also made it not run a command from the console everytime.
    Code (Text):
    options:
        version: &c&l1.0
        noperms: &fUnknown command. Type "/help" for help.

    command /nv [<text>] [<player>]:
        permission: nv.use
        permission message: "%{noperms}%"
        trigger:
            if arg 1 is not set:
                if {nv.%player%} is false:
                    message "&6Night Vision is now &aON&6."
                    apply night vision 2 to the player for 999 days
                    set {nv.%player%} to true
                    stop
                if {nv.%player%} is true:
                    remove night vision from the player
                    message "&6Night Vision is now &cOFF&6."
                    set {nv.%player%} to false
                    stop
            if arg 1 is set:
                if arg 1 is "help":
                    if player has permission "nv.use":
                        message "&2&l&m-----------------------------"
                        message "&3&lMade by: &4&lM&6&la&e&lg&a&li&9&lc"
                        message ""
                        message "&aYou are currently using version: &d{@version}"
                        message ""
                        message "&cUse &a/nv &cto toggle your &bNight Vision"
                        message "&2&l&m-----------------------------"
            if arg 1 is set:
                if arg 1 is "give":
                    if {nv.%arg-player%} is false:
                        apply night vision 2 to arg-player for 999 days
                        message "&6You have enabled &bNight Vision&6 for &7%arg-player%&6."
                        send "&7%player%&6 has enabled &bNight Vision &6for you." to arg-player
                        set {nv.%arg-player%} to true
                        stop
                    else:
                        remove night vision from arg-player
                        message "&6You have disabled &bNight Vision &6for &7%arg-player%&6."
                        send "&7%player%&6 has disabled your &bNight Vision&6." to arg-player
                        set {nv.%arg-player%} to false
                        stop

    on join:
        if player has permission "nv.use":
            if {nv.%player%} is not set:
                set {nv.%player%} to false

    on command "/heal":
        if player has permission "nv.use":
            {nv.%player%} is true
            wait 1 tick
            apply night vision 2 to the player for 999 days
            stop

    on respawn:
        {nv.%player%} is true
        wait 1 tick
        apply night vision 2 to the player for 999 days
        stop

    on drink of milk:
        {nv.%player%} is true
        wait 1 tick
        apply night vision 2 to the player for 999 days
        stop
     
  6. MPF

    MPF

    That is awesome Im glad that you like it.

    Im happy you edited it to the way you liked it. Mine was a guide line to people who do not know skript. If it works for you that is great.

    Enjoy

    ~MPF
     
  7. If it was guide lined for people who don't know how to do Skript, then why didn't you ask them how they wanted it. We both did the exact same thing made it how we wanted it.
     
  8. MPF

    MPF

    Indeed I can always edit