Solved [FactionsUUID] How to check if a location is in a claim

Discussion in 'Spigot Plugin Development' started by Alex0589, Jul 13, 2018.

  1. Hi spigot users,
    I'm creating a plugin for a person and it works perfectly. Now I just need to add a feature, but for some reason I'm unable to: when a faction unclaims a claim I should check if a location in the config was in that claim. To do this I used the LandUnclaimEvent but once I get the claim (A FLocation) I just don't really know how to proceed. Here's my code:
    Code (Text):

    public class UnclaimEvent implements Listener {
        private PrivateSigns plugin;
        public UnclaimEvent(PrivateSigns plugin){
            this.plugin = plugin;
        public void onClaim(LandUnclaimEvent event){
            SignManager manager = plugin.getManager();
            FPlayer player = event.getfPlayer();
            Faction faction = event.getFaction();
            FLocation location = event.getLocation();
    At this point I should get a location from the config(I know how to that) and check if it was in the claim.
    Don't send code but instructions as I want every part of the plugin done by myself
  2. I don't know if it can help you but at line 161 of FLocation you have a isInChunk(Location) function
    (You can loop with Faction#getAllClaims())
  3. Nvm I solve dit by myself