Solved Factions API help

Discussion in 'Plugin Development' started by SkyLarkPvP, May 16, 2015.

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

    SkyLarkPvP

    Hey, anyone know the method for checking if a player is in claimed territory in the latest factions?
    FLocation seems to be gone :(


    EDIT: Ok, so I've managed to find a documentary for the API at http://www.massivecraft.com/factions-develop#listening-to-events
    I've managed to make an event, however, it doesn't seem to work, no errors.

    Code:
       Faction faction = null;
    
        public void onJoin(PlayerJoinEvent e){
            Player player = e.getPlayer();
            faction = BoardColl.get().getFactionAt(PS.valueOf(player.getLocation()));
            if(faction == FactionColl.get().getByName("Poo"));
            player.teleport(player.getWorld().getSpawnLocation());
         
            }
    And yes, I have registered the event in my class


    Any help would be appreciated!

    I've edited the post, I now need help to make this piece of code work :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 12, 2016
  2. Offline

    Monkey_Swag

    Did you add the eventhandler annotation?
     
  3. Offline

    SkyLarkPvP

    Last edited: May 18, 2015
  4. Offline

    Monkey_Swag

    Don't worry, we've all been there :)
     
Thread Status:
Not open for further replies.

Share This Page