HomeJavaMods[Skript] SpeedGUI API (7 functions) for Skript
[Skript] SpeedGUI API (7 functions) for Skript
ModsJava

[Skript] SpeedGUI API (7 functions) for Skript

⬇ Download on Spigot
Potions_Speed_Potion.png This skript provides an API(with 7 functions) to make it easy to make and manage a SpeedGUI using Skript

DEPENDENCIES.png
Skript ( https://docs.skunity.com/downloads)
Skellet ( http://tinyurl.com/Skellett)
SkQuery-Lime ( http://tinyurl.com/skquery-lime)
TuSKe ( http://tinyurl.com/TuSKe)
WildSkript ( http://tinyurl.com/wildskript-1-8-4)

SkriptsUsingThisAPI.png
Contact me if you want your plugin using this API in this list​

VARIABLES.png
<space> between '::' and '(' because else it is recognized as ':(' \/

{SpeedGUI::used:: (player)} get set to last player's speed selected
through a GUI that use this API

{SpeedGUI::using:: (player)} more opportunities for skripts that use this api, same of {SpeedGUI::used:: (player)}, it get set to last player's speed selected through a GUI that use this API

functions.png
Here you are the 7 functions provided by this API skript:
First Function.png
SpeedGUI(player, text, integer, integer, integer, integer, item type, text, text, boolean, boolean, text, text)

Through this function of this API you can send a SpeedGUI to a player
Code (Text):
SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>", "&7Set your walk speed to &3##&b<speed>", true, true, "&cYou can't use this speed&4!", "&aYour walk speed is now &3##&b<speed>")

Arguments:

Let's see step-by-step how to use arguments, in an example for a /speedgui command for the GUI.

Code (Text):
command /speedgui:
    trigger:
1) player | player to send the SpeedGUI to
it can be arg x, loop-player, victim, attacker, etc
but it must be an online player
Code (Text):
function SpeedGUI(executor,
2) text | title that the GUI must have
it can also be with color codes
Code (Text):
function SpeedGUI(executor, "SpeedGUI",
3) integer | rows that the GUI must have
GUI are essentially virtual chest,
so max rows value is 6 as max chest rows(double chest)
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2,

4)
integer | min-slot starting from the items will be in the opened GUI
ttps://postimg.cc/image/qspm62zvb/
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0,
5) integer | speed to be gave if first item is clicked in the opened GUI
6) integer | speed to be gave if last item is clicked in the opened GUI
Possible values are from - 1(walk speed 0. 1) to 9(walk speed 1)
0 = walk speed 0; 1 = walk speed 0.2(default minecraft walk speed)
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9,
7) item | Item to be clicked for <speed> in the opened GUI
Possible values: https://github.com/bensku/Skript/blob/master/src/main/resources/aliases-english.sk (and/or aliases-english.sk of your Skript version)
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed,

8) text | Name of the item to be clicked for <speed>
Code (Text):
command /speedgui:
    trigger:
        function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>",
9) text | Lore of the item to be clicked for <speed>
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>", "&7Set your walk speed to &3##&b<speed>",
10) boolean | Should be there a permission needed for each speed number?
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>", "&7Set your walk speed to &3##&b<speed>", true,

11)
boolean | If each speed number for which the player doesn't have permission has to be skipped and has to not be in the GUI
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>", "&7Set your walk speed to &3##&b<speed>", true, true,


12) text | Error message to send if player doesn't have the permission-needed
Code (Text):
function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>", "&7Set your walk speed to &3##&b<speed>", true, true, "<none>",

<none> because "If each speed number for which the player doesn't have permission has to be skipped and has to not be in the GUI" is set to true so even if we set it to a message it will not be ever shown

13)
text | Confirm-mesage for the <speed> choosed through the item clicked corresponding in the gui

Code (Text):
command /speedgui:
    trigger:
       function SpeedGUI(executor, "SpeedGUI", 2, 0, -1, 9, potion of speed, "&aSpeed &3##&b<speed>", "&7Set your walk speed to &3##&b<speed>", true, true, "<none>", "&aYour walk speed is now &3##&b<speed>")

= 2018-05-12_14.52.01.png

(A player with all permissions execute this example /speedgui command)

2) SpeedGUI_used(player) :: boolean


it returns true if {SpeedGUI::used:: (player)} is set
else it returns false

3) SpeedGUI_using(player) :: boolean


it returns true if {SpeedGUI::using:: (player)} is set and if (player)'s walk speed isn't 0.2

4) SpeedGUI_remove_used(player)

If {SpeedGUI::used:: (player)} is set, it delete {SpeedGUI::used:: (player)}

5) SpeedGUI_remove_used(player)


If {SpeedGUI::using:: (player)} is set, it set (player)'s walk speed to default (0.2) and it delete {SpeedGUI::using:: (player)}

6) SpeedGUI_remove(player)

If {SpeedGUI::using:: (player)} is set, it set (player)'s walk speed to default (0.2) and it delete {SpeedGUI::using:: (player)}

It also delete {SpeedGUI::used:: (player)}

7) SpeedGUI_restore(player)
If {SpeedGUI::used:: (player)} is set, it set player's walk speed to value stored in {SpeedGUI::used:: (player)} and it set {SpeedGUI::using:: (player)} to value stored in {SpeedGUI::used:: (player)} too

config.png
(plugins/SpeedGUI/config.yml)
Code (Text):
version: '1.0'
per-speed-permission: speedgui.use.<speed>
Don't change version in the config manually

License.png
[​IMG]
This work (SpeedGUI by Sitieno14) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact.png
[​IMG]
[​IMG]

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

[Skript] SpeedGUI API (7 functions) for Skript is a free Minecraft Java mod. Compatible with Minecraft 1.12. Downloaded 165 times (via Spigot). Download it and open it directly in the game.

Explore more