Solved Create circle area

Discussion in 'Plugin Development' started by baenii, Oct 29, 2019.

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


    Hej everyone,

    I'm currently coding a plugin for own purposes. I want to create a circle area to prevent players from getting damage while in this area.

    I thought about something like this:

    Area spawnArea = Bukkit.getServer().getWorld("world").getSpawnLocation().addRadius(40);
    if(p.getLocation().getArea() == spawnArea) {
         //Cancel damage etc.
  2. Offline

    timtower Moderator Moderator

    @baenii Check the distance to the spawn location.
    baenii likes this.
  3. Offline


    Whoops that's too smart to come into my mind. Thanks Tim!
    timtower likes this.
Thread Status:
Not open for further replies.

Share This Page