Wiki

Clone wiki

Yodaah API / Home

What is this?

It's a huge api for SKRIPT that include some things like particles,playsound,gamerules,mobspawn,ecc !

STAGE: Beta 0.1 Version Tested: 1.9.2

INDEX:

  • Players
  • World
  • Server
  • Particles
  • Sounds
  • Mobs
  • Chat

Players Functions:

Function: keepInventory("VALUE")

VALUE: true or false

Info: Enable or Disable the keepInventory in the server

Ex:

#!python

command /keepinventory [<text>]:
    trigger:
        if arg-1 is "true" or "false":
            keepInventory("arg-1%")
            message "&7KeepInventory &b%arg-1% &7!"

Function: clearEffect(player)

PLAYER: player,loop-player,sender,attacker,victim ecc

Info: Clear all potions effects of a player

Ex:

#!python

on death of player:
    attacker is a player
    clearEffect(attacker)

Function: clearEffectsIn("WORLD")

WORLD: Set the name of the world

Info: Clear all effects of all players in the world

Ex:

#!python

on script start:
    clearEffectsIn("Minigame-1")

Function: applyEffect(player , "ID EFFECT" , "DURATION" , "AMPLIFIER" , "VALUE OF PARTICLES HIDE")

PLAYER: loop-player,sender,player,attacker,victim ecc ID EFFECT: Click here for the listhttp://minecraft.gamepedia.com/Status_effect DURATION: Set the duration of the effect AMPLIFIER: Set the amplifier of the effect VALUE: true or false [False if you want see the particles of the effect]

Info: Apply a potion effect to the player

Ex:

#!python

on death of player:
    attacker is a player
    applyEffect(attacker , 1 , 50 , 2 , "true")

Function: applyEffectsIn("WORLD" , "ID EFFECT" , "DURATION" , "AMPLIFIER")

WORLD: Set the name of the world

ID EFFECT: Click here for the listhttp://minecraft.gamepedia.com/Status_effect

DURATION: Set the duration of the effect

AMPLIFIER: Set the amplifier of the effect

Info: All players in the world get the potion effect

Ex:

#!python

on script start:
    applyEffectsIn("Minigame-2" , 1 , 20 , 2)

World Functions:

Function: getPlayersIn(player , "WORLD")

PLAYER: victim,attacker,sender ecc (WHO GET THE AMOUNT OF PLAYERS ONLINE IN THE WORLD)

WORLD: Set the name of the world

Info: Get the amount of players online in the world

Ex:

#!python

command /players [<text>]:
    trigger:
        if arg-1 is set:
            getPlayersIn(sender, "world")

Chat Functions:

Function: clearChat(player)

PLAYER: player,sender,victim,attacker,loop-player ecc

Info: Clear the chat of the player

Ex:

#!python

on join:
    clearChat(player)

Sounds Functions:

Function: playSound(player, "SOUND" , "VOLUME" , "PITCH" )

PLAYER: loop-player,victim,attacker ecc

SOUND: Click for the list of soundshttps://hub.spigotmc.org/javadocs/spigot/ (Ctrl F and type "Sound")

VOLUME: Volume of the sound

PITCH: Pitch of the sound

Info: Play a sound at location of a player or a variable!

Ex:

#!python

on join:
    wait 2 ticks
    playSound(player, ENTITY_FIREWORK_LAUNCH , 5 ,1)

Server Functions:

Function: getOnlinePlayers(player)

PLAYER: player,loop-player,attacker ecc (WHO GET THE AMOUNT OF PLAYERS ONLINE IN THE SERVER)

Info: Get the amount of players online in the server

Ex:

#!python

on quit:
    loop all players:
        getOnlinePlayers(loop-player)

Mobs Functions:

Function: doMobSpawning("VALUE=TRUE OR FALSE")

VALUE: True or False

Info: Enable or Disable the mob spawning in the server

Ex:

#!python

command /mobspawning [<text>]:
    trigger:
        if arg-1 is "true" or "false":
            doMobSpawning("%arg-1%")

Function: doMobLoot(t: text)("VALUE=TRUE OR FALSE")

VALUE: True or False

Info: Enable or Disable the drop of mobs

Ex:

#!python

on join:
    doMobLoot("true")

on quit:
    doMobLoot("false")

Function: mobGriefing("VALUE=TRUE OR FALSE")

VALUE: True or False

Info: Enable or Disable the griefing of mobs

Ex:

#!python

on kill:
    victim is a creeper
    mobGriefing("false")
    wait 1 second
    mobGriefing("true")

Function: spawnMob("MOB" , "LOC" , "MAINHAND ITEM" , "OTHERHAND ITEM" , "HELMET ITEM" , "CHESTPLATE ITEM , "LEGGINGS ITEM" , "BOOTS ITEM" , "ID EFFECT" , "AMPLIFIER" , "DURATION" , "NAME OF THE MOB" , "HEALTH")

MOB: Set the type of the mob

LOC: Loc of the mob spawn

MAINHAND: Mainhand item

OTHERHAND: Otherhand item

HELMET: Helmet item

CHESTPLATE: Chestplate item

LEGGINGS: Leggings item

BOOTS: Boots item

ID EFFECT: Click here for the listhttp://minecraft.gamepedia.com/Status_effect

AMPLIFIER: Amplifier of the effect

DURATION: Duration of the effect

NAME: Name of the mob spawned

HEALTH: Health of the mob spawned

(You can set AIR if you wont set an item to the mob and set 0 as effect)

Ex:

#!python

on death of player:
    chance of 50%:
        set {_loc} to event-entity
        spawnMob("Zombie" , "%x-pos of {_loc}% %y-pos of {_loc}% %z-pos of {_loc}%" , "bow" , "diamond_axe" , "iron_helmet" , "iron_chestplate" , "iron_leggings" , "iron_boots" , 5 , 2 , 999999 , "%event-entity%" , 20) 

Updated