use of com.massivecraft.factions.Faction in project WildLoaders by BG-Software-LLC.
the class ClaimsProvider_FactionsUUID method hasClaimAccess.
@Override
public boolean hasClaimAccess(UUID player, Chunk chunk) {
FPlayer fPlayer = FPlayers.getInstance().getById(player.toString());
FLocation fLocation = new FLocation(chunk.getWorld().getName(), chunk.getX(), chunk.getZ());
Faction faction = Board.getInstance().getFactionAt(fLocation);
return !faction.isWilderness() && faction.getFPlayers().contains(fPlayer);
}
use of com.massivecraft.factions.Faction in project Conquer by xXAndrew28Xx.
the class FOClaim method setTo.
@Override
public void setTo(ClaimType type) {
Faction faction;
switch(type) {
case WILDERNESS:
faction = factions.get(FOPlugin.WILDERNESS_ID);
break;
case SAFE_ZONE:
faction = factions.get(FOPlugin.SAFE_ZONE_ID);
break;
case WAR_ZONE:
faction = factions.get(FOPlugin.WAR_ZONE_ID);
break;
default:
return;
}
Board.setFactionAt(faction, fLocation);
}
use of com.massivecraft.factions.Faction in project UltimateChat by FabioZumbi12.
the class UCSFactionsHook method formatFac.
@Override
public String formatFac(String text, Player sender, Object receiver) {
FPlayer fp = FPlayers.getInstance().getByPlayer(sender);
if (!fp.getFaction().isWilderness()) {
Faction fac = fp.getFaction();
text = text.replace("{fac-id}", fac.getId()).replace("{fac-name}", fac.getTag()).replace("{fac-description}", fac.getDescription());
// Saber doesn't have MOTD support
if (receiver instanceof Player) {
FPlayer recmp = FPlayers.getInstance().getByPlayer((Player) receiver);
text = text.replace("{fac-relation-name}", fac.getTag(recmp)).replace("{fac-relation-color}", fac.getColorTo(recmp).toString());
}
}
return text;
}
use of com.massivecraft.factions.Faction in project Conquer by xXAndrew28Xx.
the class FUClaim method setTo.
@Override
public void setTo(ClaimType type) {
Faction faction;
switch(type) {
case WILDERNESS:
faction = factions.getWilderness();
break;
case SAFE_ZONE:
faction = factions.getSafeZone();
break;
case WAR_ZONE:
faction = factions.getWarZone();
break;
default:
return;
}
board.setFactionAt(faction, fLocation);
}
use of com.massivecraft.factions.Faction in project Conquer by xXAndrew28Xx.
the class SFClaim method setTo.
@Override
public void setTo(ClaimType type) {
Faction faction;
switch(type) {
case WILDERNESS:
faction = factions.getWilderness();
break;
case SAFE_ZONE:
faction = factions.getSafeZone();
break;
case WAR_ZONE:
faction = factions.getWarZone();
break;
default:
return;
}
board.setFactionAt(faction, fLocation);
}