Freezing a player?

Discussion in 'Plugin Development' started by ConversionGaming, Oct 14, 2013.

Thread Status:
Not open for further replies.
  1. Hi guys i was just wondering is there a way to ONLY freeze a player that you select atm all i have is a freeze command that freezes EVERYONE on the server even though i entered the targetPlayers Name, Ideas?
     
  2. Offline

    viper_monster

    ConversionGaming, you can get the player you want to freeze with
    Code:
    Bukkit.getPlayer(playerName);
     
  3. Offline

    Pezah

    Do a command to store a player in a hashmap, then do a PlayerMoveEvent, if the player is in the hashmap then e.setCancelled(true).
     
  4. Offline

    xDeeKay

    Pezah Note, I tried that once and it's extremely buggy client side when cancelling the event. An alternative way is event.getPlayer().teleport(event.getPlayer())
     
  5. Offline

    Mathias Eklund

    The best way is to add potion effects to the player, for example slow and jump potion. If you set jump at a max_value it will disable jumping, and slowness will disable walking :)
     
  6. Offline

    Ultimate_n00b

    I like this way, though his camera is zoomed in.
     
  7. Offline

    Mathias Eklund

    yeah, but that doesn't really matter in my opinion :) But some people might dislike it.
     
  8. Offline

    Hutchmaster99

    With the potion effects you can differentiate you from being frozen. Like the particle effects, zoomed in camera, etc.
     
  9. Offline

    xDeeKay

    Couldn't someone just drink milk to remove the effects?
     
  10. Thanks for all the help guys but i was really trying to steer away from hashmaps they just confuse me too much
     
  11. Its the particle effects i do not like and i was wondering anyone up for doing a joint plugin for fun?
     
  12. Offline

    A5H73Y

    People have given you solutions?

    What I did for one of my server plugins is teleport them to their location on their move event.
     
  13. Offline

    DevRosemberg

    You are all incorrect and that methods would be buggy. Use player.setWalkSpeed(0F); and then when you want to unfreeze them player.setWalkSpeed(0.2F)
     
  14. Offline

    Chinwe

  15. Offline

    DevRosemberg

    Chinwe Ive never encountered that bug. Strange :O
     
Thread Status:
Not open for further replies.

Share This Page