Is it possible to increase range?

Discussion in 'Plugin Development' started by Acer_Mortem, Apr 9, 2014.

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

    Acer_Mortem

    Is it possible to increase the range in which a player can interact with entities and blocks? I don't believe there is any specific API for such a task, however is there anyway to go around this?
     
  2. You cannot do it legitimately. Although, you can listen to PlayerInteractEvent, loop through all entities in the radius of the player's range, check if the player has line of sight with player (player.hasLineOfSight(entity)).
    For blocks, get the player's target block (player.getTargetBlock(null, range)) and set it to Air if they left clicked, or if right clicked and the item material is a block (event.getItem().getType().isBlock()), use some Maths crap and set the block to the item in hand, then reduce the item amount in their inventory.
     
Thread Status:
Not open for further replies.

Share This Page