Get IP in onPlayerLogin

Discussion in 'Plugin Development' started by wouter0100, May 28, 2012.

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

    wouter0100

    Hello,

    On my tekkit server when an user logins i got this error:
    Code:
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:61)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
    at net.minecraft.server.ServerConfigurationManager.attemptLogin(ServerConfigurationManager.java:224)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:100)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:45)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:61)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:543)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:441)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
    ... 9 more
    Caused by: java.lang.NoSuchMethodError: org.bukkit.event.player.PlayerLoginEvent.getAddress()Ljava/net/InetAddress;
    at me.Wouter0100. [Name] . [Name] .onPlayerLogin([Name].java:53)
    
    And line 53 is:
    Code:
    String ip = event.getAddress().toString().substring(1);
    And all other things works. Is there a way to fix this?
    Thanks
     
  2. Offline

    Coryf88

    PlayerLoginEvent getAddress() was added in 1.2.5-R0.2 (Build #2147). Verify the server is using that version/build or higher.
     
  3. Offline

    wouter0100

    Yeah, thats a problem. tekkit is 1.1 R4.
     
  4. Offline

    ZachBora

    I was just on tekkit website and it was 1.2.5R3...
     
    javoris767 likes this.
  5. Offline

    russjr08

    That was just released at night as a development build.
     
Thread Status:
Not open for further replies.

Share This Page