Vanish Question

Discussion in 'Spigot Plugin Development' started by Peng1104, Jun 11, 2018.

  1. Exist a way of a making a player group (espectadors) to make tem vanish and not seen for a playing player but able to be seen by a staff that teleport to them (the staff is not on the espectador group) and the staff is híden from all normal players but he can see all ?
  2. Pseudocode:
    Code (Text):

                if(!player.isStaff) {
  3. I have alreday this code:

    Code (Java):
    public void onPlayerKill(PlayerDeathEvent event) {
    Player player = event.getPlayer();
         if (PengPlugin.isPlaying(player) { // Check if the player is plaing
             PengPlugin.spectador.put(player.getWorld(),player); // Map<World,Player>
            for (Player a: Bukkit.getServer().getOnlinePlayers()) {
                if (a.getWorld().equals(player.getWorld()) {
                    // TODO hide player
  4. Hello,

    Do you want if the player died?

    Did automatic hide?

    and he can see spectators and players in the game?

    and the players in the game can't see these spectators?
  5. This'll be the method you want:
    The corresponding reveal method can be found just below it.