I'm writing Hide'n'Seek plugin but I have a problem... :D

Discussion in 'Plugin Development' started by Pr07o7yp3, Aug 20, 2013.

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

    Pr07o7yp3

    Ok, I'm writing Hide'n'Seek plugin. Something like HiveMC.
    Im using DisguiseCraft's API but I have a little problem.

    This is the code where I make player to be solid block:
    Code:java
    1. if (dcAPI.isDisguised(player))
    2. {
    3. Block blok4e = player.getWorld().getBlockAt(player.getLocation());
    4. if (blok4e.getType() == Material.AIR)
    5. {
    6. dcAPI.undisguisePlayer(player);
    7. hidePlayerToOther(player);
    8. ...
    9. }
    10. }


    First, undisguise player, then hide player from others.
    The problem is that the player is showed for a second before hide.

    How can I fix this. I want undisguising and hiding without showing the player? Ty. :)
     
  2. Offline

    MTN

    Did you try this?
    Code:java
    1. if (dcAPI.isDisguised(player))
    2. {
    3. Block blok4e = player.getWorld().getBlockAt(player.getLocation());
    4. if (blok4e.getType() == Material.AIR)
    5. {
    6. hidePlayerToOther(player);
    7. dcAPI.undisguisePlayer(player);
    8. ...
    9. }
    10. }
     
  3. Offline

    Pr07o7yp3

    Yes, I tried but undisguisePlayer show the player.
     
  4. Pr07o7yp3 This might be a problem with bukkit itself. You could try sending invisible packets to other players for a few seconds while they would normally be seen.
     
  5. Offline

    Pr07o7yp3

    Ok, how do you propose to make this?
     
Thread Status:
Not open for further replies.

Share This Page