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


Java RegionGroup类代码示例

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


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

示例1: setFlag

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
public static <T> void setFlag(ProtectedRegion region, Flag<T> flag, String value) throws CommandException, InvalidFlagFormat {
	CommandContext ccontext = new CommandContext("rg "+value, valueFlags);
	region.setFlag(flag, flag.parseInput(WGBukkit.getPlugin(), Bukkit.getConsoleSender(), ccontext.getRemainingString(0)));
	if (ccontext.hasFlag('g')) {
		String group = ccontext.getFlag('g');
		RegionGroupFlag groupFlag = flag.getRegionGroupFlag();
		if (groupFlag == null) {
			return;
		}
		RegionGroup groupValue = groupFlag.parseInput(WGBukkit.getPlugin(), Bukkit.getConsoleSender(), group);
		if (groupValue == groupFlag.getDefault()) {
			region.setFlag(groupFlag, null);
		} else {
			region.setFlag(groupFlag, groupValue);
		}
	}
}
 
开发者ID:Shevchik,项目名称:WGBuyFlags,代码行数:18,代码来源:Utils.java

示例2: enablePacket

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
@Override
public RegionData enablePacket(RegionData regionData) {
    RegionGroupFlag groupFlag = DefaultFlag.USE.getRegionGroupFlag();
    regionData.praseWGRegion().setFlag(groupFlag, RegionGroup.NON_MEMBERS);
    regionData.praseWGRegion().setFlag(DefaultFlag.USE, StateFlag.State.DENY);
    return regionData;

}
 
开发者ID:MineGaming,项目名称:cubit,代码行数:9,代码来源:LockPacket.java

示例3: disablePacket

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
@Override
public RegionData disablePacket(RegionData regionData) {
    RegionGroupFlag groupFlag = DefaultFlag.USE.getRegionGroupFlag();
    regionData.praseWGRegion().setFlag(groupFlag, RegionGroup.ALL);
    regionData.praseWGRegion().setFlag(DefaultFlag.USE, StateFlag.State.ALLOW);
    return regionData;

}
 
开发者ID:MineGaming,项目名称:cubit,代码行数:9,代码来源:LockPacket.java

示例4: createFlag

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
/**
 * Create a custom flag for WorldGuard.
 *
 * @param type        The type of flag.
 * @param id          The name/id of the flag.
 * @param value       The default value of the flag.
 * @param regionGroup The default region-group of the flag.
 * @return The creation status.
 * @deprecated Currently only supports 'STATE' flags.
 */
public static Status createFlag(String type, String id, Object value, String regionGroup) {
    if (!worldGuardEnabled()) {
        protoFlags.put(id, new ProtoFlag(type, id, value, regionGroup, false));
        return Status.IN_QUEUE;
    }
    try {
        flags.put(id, new StateFlag(id, Boolean.valueOf(value.toString()), RegionGroup.valueOf(regionGroup.toUpperCase())));
        return Status.SUCCESS;
    } catch (Exception ignored) {
    }
    return Status.FAILED;
}
 
开发者ID:DemigodsRPG,项目名称:Demigods3,代码行数:23,代码来源:WorldGuards.java

示例5: apply

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
@Override
public StateFlag apply(ProtoFlag protoFlag) {
    try {
        return new StateFlag(protoFlag.getId(), Boolean.valueOf(protoFlag.getValue().toString()), RegionGroup.valueOf(protoFlag.getRegionGroup().toUpperCase()));
    } catch (Exception ignored) {
    }
    return null;
}
 
开发者ID:DemigodsRPG,项目名称:Demigods3,代码行数:9,代码来源:WorldGuards.java

示例6: groupFlags

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
public static void groupFlags(ProtectedRegion region,Flag<?> flag, String group){
	RegionGroupFlag regionGroupFlag = flag.getRegionGroupFlag();
	RegionGroup regionGroup = RegionGroup.valueOf(group.toUpperCase());
	region.setFlag(regionGroupFlag, regionGroup);
}
 
开发者ID:gvlfm78,项目名称:BukkitHotels,代码行数:6,代码来源:HTWorldGuardManager.java

示例7: parseFlagGroupInput

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
@Override
public RegionGroup parseFlagGroupInput(RegionGroupFlag flag, String input) throws InvalidFlagFormat {
	return flag.parseInput(FlagContext.create().setInput(input).build());
}
 
开发者ID:NLthijs48,项目名称:AreaShop,代码行数:5,代码来源:WorldGuardHandler6_1_3.java

示例8: parseFlagGroupInput

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
@Override
public RegionGroup parseFlagGroupInput(RegionGroupFlag flag, String input) throws InvalidFlagFormat {
	return flag.parseInput(WorldGuardPlugin.inst(), null, input);
}
 
开发者ID:NLthijs48,项目名称:AreaShop,代码行数:5,代码来源:WorldGuardHandler5.java

示例9: parseFlagGroupInput

import com.sk89q.worldguard.protection.flags.RegionGroup; //导入依赖的package包/类
/**
 * Convert string input to a region group flag value.
 * @param flag  The flag to parse the input for
 * @param input The input
 * @return The RegionGroup denoted by the input
 * @throws InvalidFlagFormat When the input for the flag is incorrect
 */
public abstract RegionGroup parseFlagGroupInput(RegionGroupFlag flag, String input) throws InvalidFlagFormat;
 
开发者ID:NLthijs48,项目名称:AreaShop,代码行数:9,代码来源:WorldGuardInterface.java


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