Player.hidePlayer(p) in 1.14

Discussion in 'Bukkit Help' started by user_91330380, Oct 22, 2019.

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

    user_91330380

    Hello,
    i have a Problem:
    Bukkit has removed Player.hidePlayer(Player) and Player.showPlayer(Player) in the 1.14, and now i dont know how i can hide them ( looked through PlayerInterface in Wiki, but cant find an alternative).
    if sombody knows how to do it it would help me a lot.
    Jan9103
     
  2. Offline

    KarimAKL

    @Jan9103 Where do you see that it's removed? When i look at the javadocs, it only says that it's deprecated; not removed.
     
  3. Offline

    user_91330380

    I think, that it has been removed, because there arands, that it has been deprecated AND it dosnt do, what i want it to do (and it does in 1.12 with the exact same code)
    And deprecated means in my opinion, that a (new) alternative exist, which i should use.
     
  4. Offline

    KarimAKL

    @Jan9103 The javadocs says that you should use Player#hidePlayer(Plugin, Player) instead of Player#hidePlayer(Player)
     
  5. Offline

    user_91330380

    How do you define the Plugin ?
    Plugin plugin = (Plugin) this;
    Player.hidePlayer(plugin, targetPlayer);
     
  6. Online

    timtower Administrator Administrator Moderator

    It is your main class, don't need to cast it as your main class is a Plugin in the end.
     
Thread Status:
Not open for further replies.

Share This Page