Strange bug when teleporting a player.

Discussion in 'Plugin Development' started by Reinified, Sep 27, 2019.

Thread Status:
Not open for further replies.
  1. Alright so im getting an error on the last visible line of this code:
    [​IMG]
    The console looks like this:
    [​IMG]
    Notice that both the player and ArenaSpawn1 are defined. Therefore, I'm confused about why it's claiming to be a nullPointer.


    The error itself:
    [​IMG]
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. @timtower You mean that P object? Because it's not actually a player, its a custom class used to represent a player on a specific team in the plugin. That shouldn't matter though, since pl is a player anyway.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @Reinified That explains.
    Is the UUID valid? Did the player play before?
     
  5. Look at the console
    @timtower pl.getName() returns Fifti, my name. The player is defined and works properly. It just wont teleport.
    oh also, you can tell that p isnt a player because getUUID() is not the method used in player, getUniqueID() is.
     
  6. Offline

    timtower Administrator Administrator Moderator

    @Reinified Missed that line, what is the full location?
     
  7. Offline

    Sir_Jonn

    Print out the full location and not just an x.
     
  8. Offline

    robertlit

    @Reinified Are you sure that EventHandle.ArenaSpawn1 is a valid Location object? Can you post the difinition of this object?
     
    Last edited: Sep 28, 2019
  9. Offline

    Sir_Jonn

    Wrong @, not my post
     
  10. Offline

    Strahan

    Which of those lines is CurrentGameManager:35?
     
Thread Status:
Not open for further replies.

Share This Page