Server Error with PlayerListener

Discussion in 'Plugin Development' started by Ninjasturm, Apr 12, 2011.

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


    Today i used PlayerListener first time but i get this error from my server:
    about the following: onPlayerJoin has been replaced with a new signature, (PlayerJoinEvent)

    my function looks like:
    public void onPlayerJoin(PlayerEvent event) {
    System.out.println(event.getPlayer().getName() + " joined the server! :D");

    I don't know what i should edit.
  2. Offline


    Change "PlayerEvent" to "PlayerJoinEvent".
  3. Offline


    Eclipse says:
    PlayerJoinEvent cannot be resolved to a type
    Sorry im new to Java and the Bukkit API so i don't know how to fix the error.
  4. Offline


    You either need to import the event (org.bukkit.event.player.PlayerJoinEvent) or you are using an outdated version of the Bukkit API.
  5. Offline


    Thanks now it works fine.
Thread Status:
Not open for further replies.

Share This Page