Skip to content

Instantly share code, notes, and snippets.

View Snow-Pyon's full-sized avatar

Frank Kusmiruk Snow-Pyon

  • Argentina, Chaco
View GitHub Profile
@Snow-Pyon
Snow-Pyon / eval-command.sk
Last active November 11, 2017 10:09
Skript eval command
#Eval command.
#Dependencies:
#- MundoSK
#- TuSKe
#- skQuery
#- Vixio
options:
#Change this to your bot's name.
@Snow-Pyon
Snow-Pyon / Converter.sk
Last active April 15, 2018 23:00
Convert a ChatComponent JSON message to a readable text.
#ChatComponent Converter by Snow-Pyon
# Requires:
# - MundoSK (and ProtocolLib with it)
# - skript-json (for the toJsonText function)
function toSkriptColor(color: text) :: text:
if {_color} contains "_":
function toSkriptColor(color: text) :: text:
if {_color} contains "_":
replace all "_" with " " in {_color}
return {_color}
else if {_color} isn't "black", "white", "yellow" or "gold":
return "light %{_color}%"
@Snow-Pyon
Snow-Pyon / test.sk
Last active December 5, 2017 03:57
Test sublime integration
on command:
broadcast "%complete command%"
function decimalsBetween(start: number, end: number, current: numbers = 0) :: numbers:
if {_start} isn't ({_end} + .1):
set {_start} to {_start} + ({_start} > {_end} ? -0.1 : +0.1)
@Snow-Pyon
Snow-Pyon / test.sk
Last active April 16, 2021 18:47
Bossbar snippet
on script load:
#Bukkit imports
import "org.bukkit.Bukkit"
import "org.bukkit.boss.BarColor"
import "org.bukkit.boss.BarStyle"
import "org.bukkit.boss.BarFlag"
#function sendBossBar:
#Sends a bossbar to the specified players.
@Snow-Pyon
Snow-Pyon / gist.md
Last active December 10, 2017 18:16
Useful functions for display bossbar messages with Skript and skript-mirror.

Preview:

Preview

Code:

#function sendBossBar:
#Sends a bossbar to the specified players.

#Parameters:
on script load:
import "me.iblitzkriegi.vixio.effects.effembeds.EffCreateEmbed"
function setImage(embeds: texts, url: text):
loop {_embeds::*}:
set {_builder} to {EffCreateEmbed}.embedBuilders!.get(loop-value)
{_builder}.setImage({_url});
try {EffectCreateEmbed}.embedBuilders!.put(loop-value and {_builder});
@Snow-Pyon
Snow-Pyon / skq-remover.sk
Last active January 5, 2018 04:51
A snippet to remove the dependency on skQuery.
on script load:
import "ch.njol.skript.lang.Condition"
import "java.lang.System"
get expression whether <(.+)>.:
set {_args::*} to regex-1 and "Invalid condition '%regex-1%'!"
set {_condition} to {Condition}.parse({_args::*})
on script load:
import "com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager"
import "com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider"
import "ch.njol.skript.variables.Variables"
set {_yt-audio-manager} to new {YoutubeAudioSourceManager}(true)
set {kurisu::instances::yt-search-provider} to new YoutubeSearchProvider({_yt-audio-manager})
effect search (youtube|yt)track %string% and store results in [list] {<(.+)>::*}:
package me.iblitzkriegi.vixio.events.base;
import ch.njol.skript.lang.Literal;
import ch.njol.skript.lang.SkriptParser;
import ch.njol.skript.registrations.EventValues;
import ch.njol.skript.util.Getter;
import me.iblitzkriegi.vixio.Vixio;
import me.iblitzkriegi.vixio.util.wrapper.Bot;