1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skungee send player to another bungee server

Discussion in 'Skript' started by ThePlay3r, Aug 14, 2018.

Thread Status:
Not open for further replies.
  1. ThePlay3r

    ThePlay3r Member

    Joined:
    Jun 10, 2018
    Messages:
    5
    Likes Received:
    0
    So, Im making my own server selector plugin with Skungee, and I have this:
    Code (Skript):
    1. on inventory click:
    2.     if event-item is iron pickaxe named "&d&lResidence":
    3.         set {_h} to player's name
    4.         skungee send players "%{_h}%" to bungeecord server "resky"
    And if somehow click on pickaxe it send all players on server to server "resky". But I don't want that. I want to send only the player who clicked on iron pickaxe, how can I do it?
     
  2. Best Answer:
    Post #2 by jaylawl, Aug 14, 2018
  3. jaylawl

    jaylawl Well-Known Member

    Joined:
    Jan 29, 2017
    Messages:
    173
    Likes Received:
    31
    you used "players" which gets interpreted as alias for "all players" (i think). use this:
    Code (Skript):
    1. on inventory click:
    2.     event-item = iron pickaxe named "&d&lResidence"
    3.     skungee send event-player to bungeecord server "resky"
     
    #2 jaylawl, Aug 14, 2018
    Last edited: Aug 14, 2018
  4. ThePlay3r

    ThePlay3r Member

    Joined:
    Jun 10, 2018
    Messages:
    5
    Likes Received:
    0
    Well, now it works, but when any player click the iron pickaxe, he got teleported to the server, thats okay. But when he get back to lobby server and another player click iron pickaxe it teleports all players who clicked it before. Why it is doing that? ._.
     
  5. jaylawl

    jaylawl Well-Known Member

    Joined:
    Jan 29, 2017
    Messages:
    173
    Likes Received:
    31
    What's the exact code you're using?
     
  6. ThePlay3r

    ThePlay3r Member

    Joined:
    Jun 10, 2018
    Messages:
    5
    Likes Received:
    0
    Code (Skript):
    1. on inventory click:
    2.     if event-item is red glass named "&eZavrit":
    3.         play "BLOCK_IRON_DOOR_CLOSE" to player at volume 1
    4.     else if event-item is iron pickaxe named "&d&lResidence" with lore "&e&l- &eResidence||&e&l- &eSpec. Itemy||&e&l- &eDungeony":
    5.         message "&8&l[&e&l?&8&l] &ePrepojuji na server... &7[ &eResky &7]"
    6.         wait 1 second      
    7.         skungee send event-player to bungeecord server "resky"
    8.     else if event-item is diamond sword named "&d&lFactions" with lore "&e&l- &eFrakce||&e&l- &eKoTH||&e&l- &eRPG":
    9.         message "&8&l[&e&l?&8&l] &ePrepojuji na server... &7[ &eFrakce &7]"
    10.         wait 1 second  
    11.         skungee send event-player to bungeecord server "frakce"
    12.     else if event-item is grass named "&d&lSkyBlock" with lore "&e&l- &eSkyBlock||&e&l- &eObchod||&e&l- &eEventy":
    13.         message "&8&l[&e&l?&8&l] &ePrepojuji na server... &7[ &eSkyBlock &7]"  
    14.         wait 1 second          
    15.         skungee send event-player to bungeecord server "resky"
    16.     else if event-item is dispenser named "&d&lCreative" with lore "&e&l- &eCreative||&e&l- &eParcely||&e&l- &eTagy":
    17.         message "&8&l[&e&l?&8&l] &ePrepojuji na server... &7[ &eCreative &7]"
    18.         wait 1 second      
    19.         skungee send event-player to bungeecord server "creative"
    20.     else if event-item is glowing compass named "&5&l&nM&d&l&ni&5&l&nn&d&l&ni&5&l&nh&d&l&nr&5&l&ny" with lore "&eSpousta zabavy!":
    21.         play "BLOCK_ENDERCHEST_CLOSE" to player at volume 1
    22.         message "&8&l[&4&l!&8&l] &cMinihry se pripravuji!"
     
  7. ItzGoogle

    ItzGoogle Member

    Joined:
    Aug 11, 2018
    Messages:
    6
    Likes Received:
    0
    since its a player event i would use %player%



    edit: works for me
     
  8. jaylawl

    jaylawl Well-Known Member

    Joined:
    Jan 29, 2017
    Messages:
    173
    Likes Received:
    31
    according to the documentation, your syntax is incorrect:
    Code (Skript):
    1. [skungee] (send|connect) bungee[[ ]cord] [(player|uuid)[s]] %strings/players% to [bungee[[ ]cord]] [server[s]] %string%
    2. [skungee] (send|connect) [(player|uuid)[s]] %strings/players% to [bungee[[ ]cord]] server[s] %string%
    so try:
    Code (Skript):
    1. skungee send bungeecord event-player to bungeecord server "xxx"
    whether you use event-player or player doesn't make a difference here. at this point it's a matter of taste
     
  9. ItzGoogle

    ItzGoogle Member

    Joined:
    Aug 11, 2018
    Messages:
    6
    Likes Received:
    0
Thread Status:
Not open for further replies.
Loading...