glow.sk

Created by KleinLuzi

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.


#
#	╔=================================================================================================================╗
#	║																												  ║
#	║			   ▄█   ▄█▄  ▄█          ▄████████  ▄█  ███▄▄▄▄    ▄█       ███    █▄   ▄███████▄   ▄█  			  ║
#	║			  ███ ▄███▀ ███         ███    ███ ███  ███▀▀▀██▄ ███       ███    ███ ██▀     ▄██ ███  			  ║
#	║			  ███▐██▀   ███         ███    █▀  ███▌ ███   ███ ███       ███    ███       ▄███▀ ███▌ 			  ║
#	║			 ▄█████▀    ███        ▄███▄▄▄     ███▌ ███   ███ ███       ███    ███  ▀█▀▄███▀▄▄ ███▌ 			  ║
#	║			▀▀█████▄    ███       ▀▀███▀▀▀     ███▌ ███   ███ ███       ███    ███   ▄███▀   ▀ ███▌ 			  ║
#	║			  ███▐██▄   ███         ███    █▄  ███  ███   ███ ███       ███    ███ ▄███▀       ███  			  ║
#	║			  ███ ▀███▄ ███▌    ▄   ███    ███ ███  ███   ███ ███▌    ▄ ███    ███ ███▄     ▄█ ███  			  ║
#	║			  ███   ▀█▀ █████▄▄██   ██████████ █▀    ▀█   █▀  █████▄▄██ ████████▀   ▀████████▀ █▀ 				  ║
#	║			  ▀         ▀                                     ▀                                     			  ║
#	║																					   						  	  ║
#	║	    	                       © Made by KleinLuzi | DogeFun™					   							  ║
#	║							     ___________________________________			       							  ║	
#	║								       ________________________						   							  ║
#	║																					   							  ║
#	╚=================================================================================================================╝
#
# License information:
# ✲ You're allowed to change this file for yourself
# ✲ You aren't allowed to re-publish this file
# ✲ You aren't allowed to sell this file
# ✲ You aren't allowed to remove the copyright text
# ✲ You aren't allowed to copy this license information-text
#
# required Addons:
#	- Skript-Reflect (https://forums.skunity.com/resources/skript-reflect.1146/)
#	- GlowAPI in plugin-directory (https://www.spigotmc.org/resources/api-glowapi.19422/updates)
#	- PacketListenerAPI in plugin-directory (https://www.spigotmc.org/resources/api-packetlistenerapi.2930/?__cf_chl_jschl_tk__=pmd_8xeX3vhTNaKFogCtgk6wYbYNEb8lyTPHVzV7PGx_LKU-1631970959-0-gqNtZGzNAfujcnBszQm9)
#	- SkBee (https://www.spigotmc.org/resources/skbee-skript-addon.75839/)
#
# date of creation:
#	20th of November 2020
#
# date of last edit:
#	18th of September 2021
#
#	███████╗███████╗███████╗███████╗███████╗
#	╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝
#  	 ██████╗ ██╗      ██████╗ ██╗    ██╗
#  	██╔════╝ ██║     ██╔═══██╗██║    ██║
#  	██║  ███╗██║     ██║   ██║██║ █╗ ██║
#  	██║   ██║██║     ██║   ██║██║███╗██║
#  	╚██████╔╝███████╗╚██████╔╝╚███╔███╔╝
#  	 ╚═════╝ ╚══════╝ ╚═════╝  ╚══╝╚══╝ 
#	 ██████╗ ██████╗ ██████╗ ███████╗
#	██╔════╝██╔═══██╗██╔══██╗██╔════╝
#	██║     ██║   ██║██║  ██║█████╗  ██╗
#	██║     ██║   ██║██║  ██║██╔══╝  ╚═╝
#	╚██████╗╚██████╔╝██████╔╝███████╗██╗
#	 ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝
#	███████╗███████╗███████╗███████╗███████╗
#	╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝


import:
	com.google.common.collect.ImmutableList
	com.google.common.collect.Lists
	org.bukkit.Bukkit
	org.bukkit.OfflinePlayer
	org.bukkit.World
	org.bukkit.entity.Entity
	org.bukkit.entity.Player
	org.bukkit.event.EventHandler
	org.bukkit.event.Listener
	org.bukkit.plugin.Plugin
	org.inventivetalent.packetlistener.handler.PacketHandler
	org.inventivetalent.packetlistener.handler.PacketOptions
	org.inventivetalent.packetlistener.handler.ReceivedPacket
	org.inventivetalent.packetlistener.handler.SentPacket
	java.lang.reflect.InvocationTargetException
	org.bukkit.event.player.PlayerInteractEvent
	
	org.inventivetalent.glow.GlowAPI
	org.inventivetalent.glow.GlowAPI$Color

	org.bukkit.event.server.TabCompleteEvent


options:
	# Prefix for Chat-Messages
	p: &8[&6&lGlow&8] &8&l>>&7
	



on tab complete of "/glow":
	if event-player has permission "glow.use":
		set tab completions for position 1 to "on", "off"
		
	if event-player has permission "glow.admin":
		set tab completions for position 1 to "on", "off", "changecolor" and "colorlist"
	
	set {_command::*} to event.getBuffer() split at " "
	if {_command::2} is "changecolor":
		if event-player has permission "glow.admin":
			set tab completions for position 2 to "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "purple", "yellow", "white"


command /glow [<text>] [<text>]:
	permission: glow.use
	permission message: {@p} Du kannst diesen Befehl nicht ausführen.
	trigger:
		if arg-1 is not set:
			if GlowAPI.isGlowing(event-player, event-player) is false:
				GlowAPI.setGlowing(event-player, Color.AQUA, Bukkit.getOnlinePlayers())
				send "{@p} Du hast dein Glowing &aaktiviert." to event-player
				stop
				
			else if GlowAPI.isGlowing(event-player, event-player) is true:
				GlowAPI.setGlowing(event-player, Color.null, Bukkit.getOnlinePlayers())
				send "{@p} Du hast dein Glowing &cdeaktiviert." to event-player
				stop
				
				
		if arg-1 is "on":
			GlowAPI.setGlowing(event-player, Color.AQUA, Bukkit.getOnlinePlayers())
			send "{@p} Du hast dein Glowing &aaktiviert." to event-player
			stop
		
		if arg-1 is "off":
			GlowAPI.setGlowing(event-player, Color.null, Bukkit.getOnlinePlayers())
			send "{@p} Du hast dein Glowing &cdeaktiviert." to event-player
			stop
	
	
		
	
		if arg-1 is "changecolor":
			if event-player has permission "glow.admin":
			
				if arg-2 is not set:
					send "{@p} &cGebe eine Farbe an! Mögliche Farben:" to event-player
					make event-player execute command "/glow colorlist"
					stop
		
				if arg-2 is set:
					if arg-2 is "black":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.BLACK, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.BLACK, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
							
					if arg-2 is "dark_blue":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.DARK_BLUE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.DARK_BLUE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
							
					if arg-2 is "dark_green":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.DARK_GREEN, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.DARK_GREEN, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "dark_aqua":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.DARK_AQUA, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.DARK_AQUA, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "dark_red":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.DARK_RED, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.DARK_RED, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "dark_purple":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.DARK_PURPLE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.DARK_PURPLE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "gold":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.GOLD, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.GOLD, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "gray":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.GRAY, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.GRAY, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "dark_gray":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.DARK_GRAY, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.DARK_GRAY, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "blue":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.BLUE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.BLUE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "green":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.GREEN, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.GREEN, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "aqua":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.AQUA, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.AQUA, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "red":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.RED, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.RED, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "purple":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.PURPLE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.PURPLE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "yellow":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.YELLOW, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.YELLOW, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
						
					if arg-2 is "white":
						if GlowAPI.isGlowing(event-player, event-player) is false:
							GlowAPI.setGlowing(event-player, Color.WHITE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast dein Glowing &aaktiviert."
							stop
							
						if GlowAPI.isGlowing(event-player, event-player) is true:
							GlowAPI.setGlowing(event-player, Color.WHITE, Bukkit.getOnlinePlayers())
							send "{@p} Du hast deine Glowfarbe geändert."
							stop
	
					else:
						send "{@p} &cDiese Farbe ist nicht bekannt. Mögliche Farben:" to event-player
						make event-player execute command "/glow colorlist"
						stop
					
			else if event-player doesn't have permission "glow.admin":
				send "{@p} Du hast nicht die benötigten Rechte dazu." to event-player
				stop



		if arg-1 is "colorlist":
			send " " to event-player
			send "{@p} &7&lListe aller möglichen Glow-Farben:" to event-player
			send "{@p} &0black&r, &1dark_blue&r, &2dark_green&r, &3dark_aqua&r," to event-player
			send "{@p} &4dark_red&r, &5dark_purple&r, &6gold&r, &7gray&r," to event-player
			send "{@p} &8dark_gray&r, &9blue&r, &agreen&r, &baqua&r, &cred&r," to event-player
			send "{@p} &dpurple&r, &eyellow&r, &fwhite&r" to event-player
			send " " to event-player
			stop




#                                                                 
#                 AAA               PPPPPPPPPPPPPPPPP   IIIIIIIIII
#                A:::A              P::::::::::::::::P  I::::::::I
#               A:::::A             P::::::PPPPPP:::::P I::::::::I
#              A:::::::A            PP:::::P     P:::::PII::::::II
#             A:::::::::A             P::::P     P:::::P  I::::I  
#            A:::::A:::::A            P::::P     P:::::P  I::::I  
#           A:::::A A:::::A           P::::PPPPPP:::::P   I::::I  
#          A:::::A   A:::::A          P:::::::::::::PP    I::::I  
#         A:::::A     A:::::A         P::::PPPPPPPPP      I::::I  
#        A:::::AAAAAAAAA:::::A        P::::P              I::::I  
#       A:::::::::::::::::::::A       P::::P              I::::I  
#      A:::::AAAAAAAAAAAAA:::::A      P::::P              I::::I  
#     A:::::A             A:::::A   PP::::::PP          II::::::II
#    A:::::A               A:::::A  P::::::::P          I::::::::I
#   A:::::A                 A:::::A P::::::::P          I::::::::I
#  AAAAAAA                   AAAAAAAPPPPPPPPPP          IIIIIIIIII
#                                                                  
#  ________________________________________________________________________
#  _::::::::::::::::::::::__::::::::::::::::::::::__::::::::::::::::::::::_
#  ________________________________________________________________________

function EnableGlowing(entity: entity, color: string):
	if "%{_color}%" is "black":
		GlowAPI.setGlowing({_entity}, Color.BLACK, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "dark_blue":
		GlowAPI.setGlowing({_entity}, Color.DARK_BLUE, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "dark_green":
		GlowAPI.setGlowing({_entity}, Color.DARK_GREEN, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "dark_aqua":
		GlowAPI.setGlowing({_entity}, Color.DARK_AQUA, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "dark_red":
		GlowAPI.setGlowing({_entity}, Color.DARK_RED, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "dark_purple":
		GlowAPI.setGlowing({_entity}, Color.DARK_PURPLE, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "gold":
		GlowAPI.setGlowing({_entity}, Color.GOLD, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "gray":
		GlowAPI.setGlowing({_entity}, Color.GRAY, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "dark_gray":
		GlowAPI.setGlowing({_entity}, Color.DARK_GRAY, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "blue":
		GlowAPI.setGlowing({_entity}, Color.BLUE, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "green":
		GlowAPI.setGlowing({_entity}, Color.GREEN, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "aqua":
		GlowAPI.setGlowing({_entity}, Color.AQUA, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "red":
		GlowAPI.setGlowing({_entity}, Color.RED, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "purple":
		GlowAPI.setGlowing({_entity}, Color.PURPLE, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "yellow":
		GlowAPI.setGlowing({_entity}, Color.YELLOW, Bukkit.getOnlinePlayers())
	if "%{_color}%" is "white":
		GlowAPI.setGlowing({_entity}, Color.WHITE, Bukkit.getOnlinePlayers())

# example for function-usage:
# (makes any right clicked entity glow in color green)
#
# on right click:
# 	if clicked entity is set:
# 		EnableGlowing(clicked entity, "green")
		



function DisableGlowing(entity: entity):
	GlowAPI.setGlowing({_entity}, Color.null, Bukkit.getOnlinePlayers())
	
# example for function-usage:
# (makes any right clicked entity un-glow)
#
# on right click:
# 	if clicked entity is set:
# 		DisableGlowing(clicked entity)

#===============================================================End=of=Skript==================================================================	#