Solved Detect if block is a part of a structure (village)

Discussion in 'Spigot Plugin Development' started by Nuubles, Apr 12, 2021.

  1. It seems that there's probably no way to detect whether or not a block is a part of a structure, such as a village. Would there be any way of detecting if, for example, a workstation belongs to a village and if so then prevent player from breaking it.
    Currently the only solution I can think of is checking if there's villagers within a certain radius, but doing it that way would also prevent players from breaking their own blocks.
  2. This thread has a lot of useful NMS stuff you may be interested in reading;
    • Useful Useful x 1
  3. Another solution is to use log block if you do not mind the dependency.
    • Useful Useful x 1