How to code a block protection plugin?

Discussion in 'Spigot Plugin Development' started by Script1996, May 7, 2015.

  1. Hey guys,

    I'd like to make a plugin to prevent blocks of a player. (Everyone can set his own Zones) Where and what should I save in a List/HashMap or yml? I think a yml would be to big because you should set different zones for a player.

    Or is there a range command for example block 1 till block 6 so that I shouldn't have to store every block alone?

    Thanks in advance
     
  2. gigosaurus

    Supporter

    Keep a record of each zone's boundaries, then to determine if a block is in a zone compare the location of the block to the boundaries of each zone.
     
  3. Inkzzz

    Resource Staff

    When a player creates his location(s), save the player's UUID and location to a hashmap, then to a YML file.