Need help with Player movement ASAP

Discussion in 'Plugin Development' started by epicman987, May 2, 2014.

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

    epicman987

    Hello, im working on making a plugin for my server where as a police officer, you can handcuff people, a handcuffed person cannot move, cannot interact, and cannot build. I was also hopeing to make it where you could move or pickup a player once handcuffed, currently I cannot figure out or find any where the code required to be able to stop player movement once a command has been used on them. This plugin is for minecraft version 1.6.4. PLEASE HELP. Thank you in advance.
     
  2. Offline

    iFamasssxD

    Store the player in a map and on PlayerMoveEvent if they are in said map cancel the event. You can "pickup" players by setting their Vehicles
     
  3. Offline

    xTrollxDudex

    epicman987
    Yes, learn how to strategize and think programmatically. Use your problem solving skills.

    Command execute
    Push sender to collection

    While
    Check playermove
    Check existence of mover in collection ->
    Cancel
     
  4. Offline

    epicman987

    sorry about being rather dumb on the subject, I forgot to put in that I am also a new programmer in Java, and this is my first attempt at making something, I've made a mod that added blocks and items, but that's it.
     
  5. Offline

    Mr360zack

    List<String> players = new ArrayList<String>();

    //on an event
    If(players.contains(p.getName()){
    // cancel the events

    and to add them just players.add(p.getName());

    Edit: well I got ninja'd
     
  6. Offline

    JBoss925

    This is a bit advanced for your skill set...
     
  7. Offline

    iFamasssxD

    You really need to look into the API a little bit more before asking questions about things you havent tried. You should also NOT be using MC version 1.6.4 since that is very outdated.
     
  8. Offline

    epicman987

    the reason I am using 1.6.4 is because the server is modded, and the mods are for 1.6.4 (long story, cant update them) so I'm making the plugin for 1.6.4, I've found a plugin exactly like this basically but its for 1.3.2, so i cant use it, there fore I thought about making my own,
    and yes this is a bit over my head, but the server is literally revolving around this working, so if there is a possibility I can do this, I'm going to try. (probably being stupid about this)
     
Thread Status:
Not open for further replies.

Share This Page