Play sound on login.

Discussion in 'Plugin Development' started by Michiman, Aug 14, 2015.

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


    How do i make it play a sound to the player when they login?

    This is what i have and for some reason it is not working.

    public void onPlayerLogin(PlayerLoginEvent e) {
             Player p = e.getPlayer();
             p.getWorld().playSound(p.getLocation(), Sound.ENDERMAN_TELEPORT, 10, 4);
  2. Offline


    did you register the listener
    getServer().getPluginManager().registerEvents(new TestListener(), this);
  3. Offline


    @Michiman Play the sound after the event has finished. Aka: use a scheduled task
Thread Status:
Not open for further replies.

Share This Page