Development Assistance Right Approach to disable / enable pvp & mob spawn

Discussion in 'Plugin Help/Development/Requests' started by tfacchini, Jun 28, 2015.

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

    tfacchini

    Hello Guys,


    I saw loads of plugin which enable / disable pvp and mob spawn.

    I'll develop both in a way that will suit my "project", but what I don't know yet is the best practices for this kind of plugin.

    I want to have pvp disabled as well mob spawn disabled ( not all mobs, just the agressive ones ) inside my city.
    Just because my city shape is irregular ( not square, circle or whatever ) what would be the best approach to do it?

    Save all damn coordinates inside a yml and then every time the respective events are fired, run through each possible coordinate and check if pvp / mob spawn is enabled or disabled?

    Which API functions are used to perform these actions?

    Just to let it clear, I don't want code ( I'm pretty familiar with Java ), what I would love to know is the best practices for this kind of plugin.

    Thanks in advance.

    Peace,
    TF
     
  2. Online

    timtower Administrator Administrator Moderator

    @tfacchini Your best approach would probably having multiple regions in the city that are controlled with the same flags.
    Like a list of regions in an area. Then it is easy to check if something is in that area.
     
Thread Status:
Not open for further replies.

Share This Page