Solved Get player address

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Skayar

Member
Apr 21, 2019
4
0
1
78
Hi,

Is there a way to get the address/domain that the Player uses to connect to the Server / Bungeecord Network?

Thx for you help,
Skayar
 
Hi,

Is there a way to get the address/domain that the Player uses to connect to the Server / Bungeecord Network?

Thx for you help,
Skayar
I use this my self for my server when i got sponsored

It is only possible in java


Java:
public class Plugin extends JavaPlugin implements Listener
{
    @Override
    public void onEnable()
    {
        
        getServer().getPluginManager().registerEvents(this, this);
    }

    @Override
    public void onDisable()
    {
      
        PlayerJoinEvent.getHandlerList().unregister((Listener) this);
    }

    @EventHandler
    public void onLogin(PlayerLoginEvent e)
    {   

        String msg = e.getPlayer().getName() + " has joined to " + e.getHostname();
        Bukkit.getLogger().log(Level.INFO, msg);
    }
}
 
Okay, thx.

But is it maybe possible with Skript Mirror?
maybe
[doublepost=1587550673,1587550433][/doublepost]
code_language.skript:
import:
    org.bukkit.event.player.PlayerLoginEvent
on "PlayerLoginEvent":
    set {_name} to event.getHostname()
    send "%{_name}%" to event.getPlayer()

Not tested, if does not work try to remove "to event.getPlayer()"
 
Status
Not open for further replies.