playerwarp.sk

Created by Unknown

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.

options:
	# Prefix
	prefix: &8[&b→ &fPlayer Warps &b←&8] &7
	# Main command ex: /<this> create Hello
	main_command: playerwarp
	# Main command secondary commands, ex: /<main_command> create Hello; /<an alias here> create Hello
	main_command_aliases: playerwarps:playerwarp, playerwarps, pwarp, pwarps
	# Main command description ex: /help; when it shows the command it'll show this description
	main_command_description: Simple player warp command
	# Main color to be used in messages
	main_color: &b
	# Secondary color to be used in messages
	secondary_color: &f
	# Error color ot be used in messages
	error_color: &3
	# Permissions
	permission_create: pwarps.create
	permission_delete_self: pwarps.delete
	permission_delete_other: pwarps.delete.other
	permission_teleport: pwarps.teleport
	permission_info: pwarps.info
	permission_feature: pwarps.feature
	permission_featured: pwarps.featuredlist
	permission_bypasslimit: pwarps.unlimited
	# Variants, when using /pwarp delete; or other commands, it will take all of these possibilitys
	create_variants: "create"
	delete_variants: "remove" or "rem" or "delete" or "del"
	teleport_variants: "teleport" or "tp"
	list_variants: "list" or "l"
	info_variants: "i" or "info"
	# Admin command ot feature warps
	feature_variants: "feature"
	# player command to show featured warps
	featured_variants: "featured" or "featuredlist" or "f"
	# Allowed warps per player (Bypassable with <permission_bypasslimit> above in settings)
	max_warps: 1
	# Banned symbols from warps
	# Do not touch please
	blocked_symbols: "(" or ")" or "`" or "~" or "!" or "@" or "##" or "$" or "%%" or "^" or "-" or "+" or "=" or "|" or "\" or "/" or "{" or "}" or "[" or "]" or ":" or ";" or """" or "'" or "<" or ">" or "," or "." or "?" or "&" or "*"
	
command /{@main_command} [<text>] [<text>]:
	aliases: {@main_command_aliases}
	description: {@main_command_description}
	trigger:
		if arg-1 is not set:
			send "{@prefix}{@error_color}/{@main_command} <create/delete/teleport/info/featured> <warp>"
			send "{@prefix}{@error_color}/{@main_command} <list>"
			stop
		if arg-1 is {@create_variants}:
			if player does not have permission "{@permission_create}":
				send "{@prefix}{@error_color}No permission!"
			else:
				if arg-2 is not set:
					send "{@prefix}{@error_color}Please input a warp name"
				else:
					if player does not have permission "{@permission_bypasslimit}":
						loop {pwarps::warps::*}:
							if {pwarps::warpi::%loop-value%::owneru} is player's uuid:
								add 1 to {_c}
						if {_c} is not set:
							set {_c} to 0
						if {_c} >= {@max_warps}:
							send "{@prefix}{@error_color}You already have a maximum amount of warps allowed!"
							stop
					if uncolored arg-2 contains {@blocked_symbols}:
						send "{@prefix}{@error_color}Please do not use unregular symbols in the warp name!"
						stop
					loop {pwarps::warps::*}:
						if arg-2 is loop-value:
							send "{@prefix}{@error_color}That warp name is already in use by another player!"
							stop
					add arg-2 to {pwarps::warps::*}
					set {pwarps::warpi::%arg-2%::loc} to player's location
					set {pwarps::warpi::%arg-2%::owneru} to player's uuid
					set {pwarps::warpi::%arg-2%::featured} to false
					set {pwarps::warpi::%arg-2%::created} to now
					send "{@prefix}{@main_color}Successfully set up your player warp named {@secondary_color}%arg-2%{@main_color}!"
		else if arg-1 is {@delete_variants}:
			if player does not have permission "{@permission_delete_other}" or "{@permission_delete_self}":
				send "{@prefix}{@error_color}No permission!"
				stop
			if arg-2 is not set:
				send "{@prefix}{@error_color}Please input a warp name"
			else:
				loop {pwarps::warps::*}:
					if arg-2 is loop-value:
						if {pwarps::warpi::%arg-2%::owneru} is player's uuid:
							if player does not have permission "{@permission_delete_self}":
								send "{@prefix}{@error_color}No permission!"
							else:
								remove arg-2 from {pwarps::warps::*}
								delete {pwarps::warpi::%arg-2%::loc}
								delete {pwarps::warpi::%arg-2%::owneru}
								send "{@prefix}{@main_color}Successfully wiped the warp information for {@secondary_color}%arg-2%{@main_color}!"
							stop
						else:
							if player does not have permission "{@permission_delete_other}":
								send "{@prefix}{@error_color}No permission!"
							else:
								remove arg-2 from {pwarps::warps::*}
								delete {pwarps::warpi::%arg-2%::loc}
								delete {pwarps::warpi::%arg-2%::owneru}
								delete {pwarps::warpi::%arg-2%::featured}
								delete {pwarps::warpi::%arg-2%::created}
								send "{@prefix}{@main_color}Successfully wiped the warp information for {@secondary_color}%arg-2%{@main_color}!"
							stop
						stop
				send "{@prefix}{@error_color}No warp by the name of {@secondary_color}%uncolored arg-2%{@error_color}!"
		else if arg-1 is {@teleport_variants}:
			if player does not have permission "{@permission_teleport}":
				send "{@prefix}{@error_color}No permission!"
				stop
			if arg-2 is not set:
				send "{@prefix}{@error_color}Please input a warp name"
			else:
				loop {pwarps::warps::*}:
					if arg-2 is loop-value:
						teleport the player to {pwarps::warpi::%arg-2%::loc}
						send "{@prefix}{@main_color}Successfully teleported you to {@secondary_color}%arg-2%{@main_color}!"
						stop
				send "{@prefix}{@error_color}No warp by the name of {@secondary_color}%uncolored arg-2%{@error_color}!"
		else if arg-1 is {@info_variants}:
			if player does not have permission "{@permission_info}":
				send "{@prefix}{@error_color}No permission!"
			else:
				if arg-2 is not set:
					send "{@prefix}{@error_color}Please input a warp name"
				else:
					loop {pwarps::warps::*}:
						if arg-2 is loop-value:
							send "&8&m-----------------------"
							send "&e&l -  Player Warps  - "
							send "&8&m-----------------------"
							send "&7Player: &b%{pwarps::player::%{pwarps::warpi::%arg-2%::owneru}%}%"
							send "&7Created At: &b%{pwarps::warpi::%arg-2%::created}%"
							if {pwarps::warpi::%arg-2%::featured} is true:
								set {_featured} to "&bYes"
							else:
								set {_featured} to "&bNo"
							send "&7Featured: %{_featured}%"
							stop
					send "{@prefix}{@error_color}No warp by the name of {@secondary_color}%uncolored arg-2%{@error_color}!"
		else if arg-1 is {@feature_variants}:
			if player does not have permission "{@permission_feature}":
				send "{@prefix}{@error_color}No permission!"
			else:
				if arg-2 is not set:
					send "{@prefix}{@error_color}Please input a warp name"
				else:
					loop {pwarps::warps::*}:
						if arg-2 is loop-value:
							if {pwarps::warpi::%arg-2%::featured} is false:
								set {pwarps::warpi::%arg-2%::featured} to true
								send "{@prefix}{@main_color}Set the featured status of warp {@secondary_color}%arg-2%{@main_color} to {@secondary_color}true{@main_color}!"
								stop
							else:
								set {pwarps::warpi::%arg-2%::featured} to false
								send "{@prefix}{@main_color}Set the featured status of warp {@secondary_color}%arg-2%{@main_color} to {@secondary_color}false{@main_color}!"
								stop
							stop
					send "{@prefix}{@error_color}No warp by the name of {@secondary_color}%uncolored arg-2%{@error_color}!"
		else if arg-1 is {@featured_variants}:
			if player does not have permission "{@permission_featured}":
				send "{@prefix}{@error_color}No permission!"
			else:
				send "&8&m-----------------------"
				send " &8(&f&l!&8) &6&lFeatured Warps &8(&f&l!&8) "
				send "&8&m-----------------------"
				loop {pwarps::warps::*}:
					if {pwarps::warpi::%loop-value%::featured} is true:
						send "&e- &6%loop-value%"
		else if arg-1 is {@list_variants}:
			send "&8&m-----------------------"
			send "&e&l -  Player Warps  - "
			send "&8&m-----------------------"
			set {_warps} to "%{pwarps::warps::*}%"
			replace every "," in {_warps} with "&a,&b"
			replace every "and" in {_warps} with "&aand&b"
			if {_warps} is "<none>":
				set {_warps} to "No warps"
			send "&b%{_warps}%"
		else:
			send "{@prefix}{@error_color}/{@main_command} <create/delete/teleport/info/featured> <warp>"
			send "{@prefix}{@error_color}/{@main_command} <list>"
				
# player info
				
on join:
	if {pwarps::player::%player's uuid%} is not set:
		set {pwarps::player::%player's uuid%} to player
	if {pwarps::uuid::%player%} is not set:
		set {pwarps::player::%player%} to player's uuid
				
# Console Credits
			
on skript load:
	send newline to console
	send "&8Player Warps &b> &fEnabled skript &bPlayer Warps" to console
	send "&8Player Warps &b> &fThank you for using &bPlayer Warps&f by Itzdlg" to console