Player "Forcefield"

Discussion in 'Plugin Development' started by AmazingDoge, Jan 9, 2016.

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

    AmazingDoge

    Hello Bukkit Community!

    I'm a bit stuck on figuring out how to add a player forcefield gadget, like the one on Mineplex. If you would be able to point me in a direction that would be great!

    Thanks,
    AmazingDoge
     
  2. Offline

    Zombie_Striker

    @AmazingDoge
    Well, lets assume I don't know what you're talking about (which is the case), can you explain what you want? If it's to stop a player/entity from coming close to the player, you can loop through all the entities nearby(
    Code:
    Main_Player.getNearbyEntities(radius,radius,riadus)), 
    And then set their velocity to be negative (going backwards)
     
  3. Offline

    AmazingDoge

  4. Offline

    Zombie_Striker

    @AmazingDoge
    Can you please explain. This shouldn't require me to visit a link. Please just give me some description of what you want.
     
  5. Offline

    Anrza

    Check every tick if a player has another player near it with Player#getNearbyEntities() and set the velocity of those players.
     
    Zombie_Striker likes this.
  6. Offline

    AmazingDoge

Thread Status:
Not open for further replies.

Share This Page