Strange bug when teleporting a player.

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

  1. Offline

    Reinified

    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 Moderator Moderator

  3. Offline

    Reinified

    @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 Moderator Moderator

    @Reinified That explains.
    Is the UUID valid? Did the player play before?
     
  5. Offline

    Reinified

    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 Moderator 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. Online

    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?
     

Share This Page