I've been trying to get this thing to work with factions. For the most part, everything works, but I'm very confused on how to find if the location is in the Wilderness faction. I've read through this: http://www.massivecraft.com/faction...m_medium=DocsDeveloper&utm_campaign=BukkitDev And figured this would be the best way to go about solving the issue, with the goal being to find out if the faction at the location is neutral, and the faction that is neutral is also not the Wilderness faction and if so, return true. Code:java public boolean inNeutral(Player p, Location loc) { UPlayer up = UPlayer.get(p); Faction faction = BoardColls.get().getFactionAt(PS.valueOf(loc)); if(up.getFaction().getRelationTo(faction) == Rel.NEUTRAL && !FactionColls.get().getForUniverse(faction.getUniverse()).getByName("Wilderness").isNone()) { return true; } return false; } Turns out it doesn't work and it returns false. So then I tried this: Code:java public boolean inNeutral(Player p, Location loc) { UPlayer up = UPlayer.get(p); Faction faction = BoardColls.get().getFactionAt(PS.valueOf(loc)); if(up.getFaction().getRelationTo(faction) == Rel.NEUTRAL && !faction.getName().equalsIgnoreCase("wilderness")) { return true; } return false; } This only returns true for some reason. The location would be located in the wilderness, but for some reason will still return as true. - If anybody can assist on this issue, it'd be great. Thanks.
Aren't you meant to do: Code: && faction.getName().equalsIgnoreCase("wilderness")) Not Code: && !faction.getName().equalsIgnoreCase("wilderness"))
KingFaris11 not according to the question. caderape Would break with a similar name, i.e. '2ndwilderness'. That aside, Wilderness has a name dedicated to it, so equals would be fine (even better as my example shows)