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


Java Style类代码示例

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


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

示例1: deserialize

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
@Override
protected boolean deserialize(final String s) {
	final String[] split = s.split(",");
	if (split.length != 3)
		return false;
	try {
		variant = split[0].isEmpty() ? null : Variant.valueOf(split[0]);
		color = split[1].isEmpty() ? null : Color.valueOf(split[1]);
		style = split[2].isEmpty() ? null : Style.valueOf(split[2]);
	} catch (final IllegalArgumentException e) {
		return false;
	}
	return true;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:15,代码来源:HorseData.java

示例2: spawnHorse

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
@Override
public LivingEntity spawnHorse(Location loc, HorseType type, Color color, Style style, boolean tame, boolean chest)
{
	Horse horse = (Horse) loc.getWorld().spawnEntity(loc, type.getEntity());
	horse.setColor(color);
	horse.setStyle(style);
	horse.setTamed(tame);

	if (chest && horse instanceof ChestedHorse)
		((ChestedHorse) horse).setCarryingChest(true);
	
	return horse;
}
 
开发者ID:dmulloy2,项目名称:SwornAPI,代码行数:14,代码来源:SpecialEntities.java

示例3: StoredEntityType

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
StoredEntityType(final int id, final String name) {
	this.id = id;
	this.name = Check.notNull(name, "The name cannot be null!");

	if (name.startsWith("HORSE_")) {
		this.type = EntityType.HORSE;
		this.style = Optional.of(Style.valueOf(name.replaceFirst("HORSE_", "")));
	}
	else {
		this.type = EntityType.valueOf(name);
		this.style = Optional.empty();
	}
}
 
开发者ID:Craftolution,项目名称:CraftoPlugin,代码行数:14,代码来源:StoredEntityType.java

示例4: deserialize

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
@Override
public void deserialize(IDataNode dataNode) throws DeserializeException {
    _color = dataNode.getEnum("color", Color.WHITE, Color.class);
    _variant = dataNode.getEnum("variant", Variant.HORSE, Variant.class);
    _style = dataNode.getEnum("style", Style.NONE, Style.class);
    _domestication = dataNode.getInteger("dom");
    _maxDomestication = dataNode.getInteger("max-dom");
    _hasChest = dataNode.getBoolean("chest");
    _jumpStrength = dataNode.getDouble("jump", 1.0D);
}
 
开发者ID:JCThePants,项目名称:NucleusFramework,代码行数:11,代码来源:HorseAnimal.java

示例5: loadData

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
@Override
public void loadData(ConfigurationSection section) {
	this.colour = Color.valueOf(section.getString("color", Color.BLACK.name()));
	this.style = Style.valueOf(section.getString("style", Style.NONE.name()));
	this.variant = Variant.valueOf(section.getString("variant", Variant.HORSE.name()));
	super.loadData(section);
}
 
开发者ID:CodingBadgers,项目名称:MineKart,代码行数:8,代码来源:HorseMountData.java

示例6: setStyle

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
@Override
public void setStyle(Style style){
	((IEntityHorsePet) getEntityPet()).setStyle(style);
	this.style = style;
   }
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:6,代码来源:HorsePet.java

示例7: getStyle

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
@Override
public Style getStyle(){
	return this.style;
   }
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:5,代码来源:HorsePet.java

示例8: getStyle

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
/** TODO: Documentation */
public Optional<Style> getStyle() { return this.style; }
 
开发者ID:Craftolution,项目名称:CraftoPlugin,代码行数:3,代码来源:StoredEntityType.java

示例9: getHorseStyle

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
public Style getHorseStyle() {
	return style;
}
 
开发者ID:CodingBadgers,项目名称:MineKart,代码行数:4,代码来源:HorseMountData.java

示例10: getStyle

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
Horse.Style getStyle(); 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:2,代码来源:Horse.java

示例11: setStyle

import org.bukkit.entity.Horse.Style; //导入依赖的package包/类
void setStyle(Horse.Style style); 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:2,代码来源:Horse.java


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