1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Get area from areas file

Comments in 'Plugin Development' started by mariusbjornor, Aug 8, 2015.

  1. mariusbjornor

    mariusbjornor Active Member

    Jan 6, 2015
    Minecraft User:
    Im making a simple plugin for my own use together with @LDX 's iProtector..

    I need help with a code to get area data from areas.json upon a command..

    Idea is to do like this:

    /area here

    then plugin retrieves data from areas.json to see if your standing inside a area thats registered. if you are, plugin returns something like this:

    Your currently in area: Spawn

    if not it returns something like this:

    No area registered here

    I first thought i could do something similar to iProtectors list command but i dont know how to put in that it need to look if players is in an area, and not list all..

      case "list":
    $p->hasPermission("iprotector") || $p->hasPermission("iprotector.command") || $p->hasPermission("iprotector.command.area") || $p->hasPermission("iprotector.command.area.list")) {
    $o "Areas:";
    $this->areas as $area) {
    $o $o " " $area->getName() . ";";
    Thanks for all help :-D

Share This Page