Question Spectator mode doesn't work properly if set on respawn

Discussion in 'Plugin Help/Development/Requests' started by Konato_K, Jan 31, 2016.

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

    Konato_K

    First of all I'm not sure if I used the right tag for this thread, and I'm not really asking for help here, sorry if I used the wrong one.

    I've been working on a plugin and adding spectator mode to it, I noticed that if I set spectator mode to a player while they respawn (in the RespawnEvent handler) the player goes to some kind of spectator mode, they can't interact with stuff, but they also don't have access to the spectator hotbar and they can't go through blocks.

    The solution is simple, set players to spectator mode a couple ticks later, however, I'm curious of what could cause this issue since other gamemodes work fine (possible because they don't related to noclipping and special hotbars), has anyone else experienced this? Or just my CB version is buggy?

    I'm using CraftBukkit 1.8.8 (git-Spigot-5f38d38-12698ea)
     
  2. Offline

    teej107

    @Konato_K It is sure a weird bug but like you said. I'm certain setting the GameMode on the next game tick will fix it. As for the spectator hotbar, I don't know what is with that. I never actually used it before because it has never shown up when I go in spectator.
     
  3. Offline

    pie_flavor

    @teej107 To use the spectator hotbar, you must press a number first. It will pop up, and vanish if you don't do anything.
     
    teej107 likes this.
  4. Offline

    teej107


    [​IMG]
     
    Last edited: Feb 1, 2016
    Konato_K likes this.
Thread Status:
Not open for further replies.

Share This Page