当前位置: 首页>>代码示例>>Java>>正文


Java Board类代码示例

本文整理汇总了Java中com.massivecraft.factions.Board的典型用法代码示例。如果您正苦于以下问题:Java Board类的具体用法?Java Board怎么用?Java Board使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Board类属于com.massivecraft.factions包,在下文中一共展示了Board类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mimicUnclaim

import com.massivecraft.factions.Board; //导入依赖的package包/类
private Boolean mimicUnclaim(com.massivecraft.factions.FPlayer fplayer, com.massivecraft.factions.Faction faction, FLocation flocation) {
	if (Econ.shouldBeUsed()) {
		double refund = Econ.calculateClaimRefund(faction.getLandRounded());
		
		if (Conf.bankEnabled && Conf.bankFactionPaysLandCosts) {
			if ( ! Econ.modifyMoney(faction, refund, "to unclaim this land", "for unclaiming this land")) return false;
		} else {
			if ( ! Econ.modifyMoney(fplayer, refund, "to unclaim this land", "for unclaiming this land")) return false;
		}
	}
	
	Board.getInstance().removeAt(flocation);
	faction.msg("%s<i> unclaimed some land.", fplayer.describeTo(faction, true));

	// Log if factions wants us to 
	if (Conf.logLandUnclaims) {
		P.p.log(fplayer.getName()+" unclaimed land at ("+flocation.getCoordString()+") from the faction: "+faction.getTag());
	}
	
	return true;
}
 
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:22,代码来源:Events_1_6.java

示例2: mimicUnclaim

import com.massivecraft.factions.Board; //导入依赖的package包/类
private Boolean mimicUnclaim(com.massivecraft.factions.FPlayer fplayer, com.massivecraft.factions.Faction faction, FLocation flocation) {
	if (Econ.shouldBeUsed()) {
		double refund = Econ.calculateClaimRefund(faction.getLandRounded());
		
		if (Conf.bankEnabled && Conf.bankFactionPaysLandCosts) {
			if ( ! Econ.modifyMoney(faction, refund, "to unclaim this land", "for unclaiming this land")) return false;
		} else {
			if ( ! Econ.modifyMoney(fplayer, refund, "to unclaim this land", "for unclaiming this land")) return false;
		}
	}
	
	Board.removeAt(flocation);
	
	faction.msg("%s<i> unclaimed some land.", fplayer.describeTo(faction, true));

	// Log if factions wants us to 
	if (Conf.logLandUnclaims) {
		P.p.log(fplayer.getName()+" unclaimed land at ("+flocation.getCoordString()+") from the faction: "+faction.getTag());
	}
	
	return true;
}
 
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:23,代码来源:Events_1_8.java

示例3: doesFactionsApply

import com.massivecraft.factions.Board; //导入依赖的package包/类
public final boolean doesFactionsApply(Location location)
{
	if (! isEnabled())
		return false;

	try
	{
		return ! Board.getAbsoluteFactionAt(new FLocation(location)).isNone();
	}
	catch (Throwable ex)
	{
		handler.getLogHandler().debug(Level.WARNING, "doesFactionsApply()");
	}

	return false;
}
 
开发者ID:MineSworn,项目名称:SwornCritters,代码行数:17,代码来源:SwornNationsHandler.java

示例4: isWarZone

import com.massivecraft.factions.Board; //导入依赖的package包/类
private final boolean isWarZone(Location location)
{
	if (! isEnabled())
		return false;

	try
	{
		Faction fac = Board.getAbsoluteFactionAt(new FLocation(location));
		return fac.isWarZone();
	}
	catch (Throwable ex)
	{
		//
	}

	return false;
}
 
开发者ID:dmulloy2,项目名称:SwornRPG,代码行数:18,代码来源:SwornNationsHandler.java

示例5: isSafeZone

import com.massivecraft.factions.Board; //导入依赖的package包/类
private final boolean isSafeZone(Location location)
{
	if (! isEnabled())
		return false;

	try
	{
		Faction fac = Board.getAbsoluteFactionAt(new FLocation(location));
		return fac.isSafeZone();
	}
	catch (Throwable ex)
	{
		//
	}

	return false;
}
 
开发者ID:dmulloy2,项目名称:SwornRPG,代码行数:18,代码来源:SwornNationsHandler.java

示例6: isWarZone

import com.massivecraft.factions.Board; //导入依赖的package包/类
private final boolean isWarZone(Location location)
{
	if (! isEnabled())
		return false;

	try
	{
		Faction fac = Board.getAbsoluteFactionAt(new FLocation(location));
		return fac.isWarZone();
	}
	catch (Throwable ex)
	{
		handler.getLogHandler().debug(Level.WARNING, Util.getUsefulStack(ex, "isWarZone()"));
	}

	return false;
}
 
开发者ID:dmulloy2,项目名称:SwornGuns,代码行数:18,代码来源:SwornNationsHandler.java

示例7: isSafeZone

import com.massivecraft.factions.Board; //导入依赖的package包/类
private final boolean isSafeZone(Location location)
{
	if (! isEnabled())
		return false;

	try
	{
		Faction fac = Board.getAbsoluteFactionAt(new FLocation(location));
		return fac.isSafeZone();
	}
	catch (Throwable ex)
	{
		handler.getLogHandler().debug(Level.WARNING, Util.getUsefulStack(ex, "isSafeZone()"));
	}

	return false;
}
 
开发者ID:dmulloy2,项目名称:SwornGuns,代码行数:18,代码来源:SwornNationsHandler.java

示例8: getAt

import com.massivecraft.factions.Board; //导入依赖的package包/类
@Override
public Faction getAt(Chunk chunk) {
	FLocation flocation = new FLocation(chunk.getWorld().getName(), chunk.getX(), chunk.getZ());
	String id = Board.getInstance().getIdAt(flocation);
	
	if (id == null) return null;
	
	return get(id);
}
 
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:10,代码来源:Factions_1_6.java

示例9: getAt

import com.massivecraft.factions.Board; //导入依赖的package包/类
@Override
public Faction getAt(Chunk chunk) {
	FLocation flocation = new FLocation(chunk.getWorld().getName(), chunk.getX(), chunk.getZ());
	String id = Board.getIdAt(flocation);
	
	if (id == null) return null;
	
	return get(id);
}
 
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:10,代码来源:Factions_1_8.java

示例10: initialize

import com.massivecraft.factions.Board; //导入依赖的package包/类
@Override
public void initialize() {
    try {
        Field flocationIdsField = Board.class.getDeclaredField("flocationIds");
        flocationIdsField.setAccessible(true);
        flocationIds = (Map<FLocation, TerritoryAccess>) flocationIdsField.get(null);
        flocationIdsField.setAccessible(false);
    } catch (NoSuchFieldException | IllegalAccessException ex) {
        getPlugin().getLogger().severe("Factions version found is incompatible!");
        getPlugin().getServer().getPluginManager().disablePlugin(getPlugin());
        return;
    }

    super.initialize();
}
 
开发者ID:novucs,项目名称:factions-top,代码行数:16,代码来源:Factions0108.java

示例11: onClaim

import com.massivecraft.factions.Board; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onClaim(LandClaimEvent event) {
    Faction faction = Board.getFactionAt(event.getLocation());
    Multimap<String, ChunkPos> claims = HashMultimap.create();
    claims.put(faction.getId(), getChunkPos(event.getLocation()));
    callEvent(new FactionClaimEvent(event.getFaction().getId(), claims));
}
 
开发者ID:novucs,项目名称:factions-top,代码行数:8,代码来源:Factions0108.java

示例12: factionsUUIDClaim

import com.massivecraft.factions.Board; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public boolean factionsUUIDClaim(Location loc) {
    if (wild.getConfig().getBoolean("FactionsUUID")) {
        //Long call to insure it calls FactionsUUID method not massivecraft Factions
        com.massivecraft.factions.Faction faction = com.massivecraft.factions.Board.getInstance().getFactionAt(new com.massivecraft.factions.FLocation(loc));
        if (!faction.isNone() && !checkSurroundingFactionsUUID(loc))
            return true;
        else
            return false;
    } else
        return false;
}
 
开发者ID:Qballl,项目名称:WildernessTp,代码行数:13,代码来源:ClaimChecks.java

示例13: checkSurroundingFactionsUUID

import com.massivecraft.factions.Board; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private boolean checkSurroundingFactionsUUID(Location loc) {
    Board board = com.massivecraft.factions.Board.getInstance();
    int distance = range / 2;
    Vector top = new Vector(loc.getX() + distance, loc.getY(), loc.getZ() + distance);
    Vector bottom = new Vector(loc.getX() - distance, loc.getY(), loc.getZ() - distance);
    for (int z = bottom.getBlockZ(); z <= top.getBlockZ(); z++) {
        for (int x = bottom.getBlockX(); x <= top.getBlockX(); x++) {
            if (board.getFactionAt(new FLocation(new Location(loc.getWorld(), loc.getX() + x, loc.getY(), loc.getZ() + z))).isNone())
                return true;
        }
    }
    return false;
}
 
开发者ID:Qballl,项目名称:WildernessTp,代码行数:15,代码来源:ClaimChecks.java

示例14: legacyFactionsClaim

import com.massivecraft.factions.Board; //导入依赖的package包/类
public boolean legacyFactionsClaim(Location loc){
    //WHY DO THEY REFACTOR THE PACKAGE
    //Long call to get the board of legacy factions
    if(wild.getConfig().getBoolean("LegacyFactions")){
        net.redstoneore.legacyfactions.entity.Board board = net.redstoneore.legacyfactions.entity.Board.get();
        net.redstoneore.legacyfactions.entity.Faction faction = board.getFactionAt(new net.redstoneore.legacyfactions.FLocation(loc));
        if(faction.isWilderness()&&!checkSurroundingLegacyFactions(loc))
            return true;
        else
            return false;
    }
    return false;
}
 
开发者ID:Qballl,项目名称:WildernessTp,代码行数:14,代码来源:ClaimChecks.java

示例15: checkSurroundingLegacyFactions

import com.massivecraft.factions.Board; //导入依赖的package包/类
private boolean checkSurroundingLegacyFactions(Location loc) {
    net.redstoneore.legacyfactions.entity.Board board = net.redstoneore.legacyfactions.entity.Board.get();        int distance = range / 2;
    Vector top = new Vector(loc.getX() + distance, loc.getY(), loc.getZ() + distance);
    Vector bottom = new Vector(loc.getX() - distance, loc.getY(), loc.getZ() - distance);
    for (int z = bottom.getBlockZ(); z <= top.getBlockZ(); z++) {
        for (int x = bottom.getBlockX(); x <= top.getBlockX(); x++) {
            if (board.getFactionAt(new net.redstoneore.legacyfactions.FLocation(new Location(loc.getWorld(), loc.getX() + x, loc.getY(), loc.getZ() + z))).isWilderness())
                return true;
        }
    }
    return false;
}
 
开发者ID:Qballl,项目名称:WildernessTp,代码行数:13,代码来源:ClaimChecks.java


注:本文中的com.massivecraft.factions.Board类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。