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


Java Horse.Style方法代码示例

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


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

示例1: getStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static Horse.Style getStyle(PlayerDataRPG pd) {
    if (pd.horseStyle == null)
        pd.horseStyle = RMath.randObject(Horse.Style.values());
    return pd.horseStyle;
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:6,代码来源:HorseManager.java

示例2: setStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public void setStyle(Horse.Style style){
	datawatcher.set(STYLE, getColor().ordinal() & 0xFF | style.ordinal() << 8);
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:4,代码来源:EntityHorsePet.java

示例3: getStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public Horse.Style getStyle(){
	return Horse.Style.values()[(getVariant() >>> 8)];
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:4,代码来源:EntityHorsePet.java

示例4: setStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public void setStyle(Horse.Style style){
	datawatcher.watch(20, getColor().ordinal() & 0xFF | style.ordinal() << 8);
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:4,代码来源:EntityHorsePet.java

示例5: get

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static Horse.Style get(String string) {
    return instance()._get(string);
}
 
开发者ID:GameBoxx,项目名称:GameBoxx,代码行数:4,代码来源:HorseStyles.java

示例6: getName

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static String getName(Horse.Style key) {
    return instance()._getName(key);
}
 
开发者ID:GameBoxx,项目名称:GameBoxx,代码行数:4,代码来源:HorseStyles.java

示例7: getDisplayName

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static String getDisplayName(Horse.Style key) {
    return instance()._getDisplayName(key);
}
 
开发者ID:GameBoxx,项目名称:GameBoxx,代码行数:4,代码来源:HorseStyles.java

示例8: getAliases

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static List<String> getAliases(Horse.Style key) {
    return instance()._getAliases(key);
}
 
开发者ID:GameBoxx,项目名称:GameBoxx,代码行数:4,代码来源:HorseStyles.java

示例9: setStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
@Override
public void setStyle(Horse.Style bukkitStyle) {
    getBukkitEntity().setStyle(bukkitStyle);
}
 
开发者ID:TechzoneMC,项目名称:SonarPet,代码行数:5,代码来源:NMSEntityHorseImpl.java

示例10: setStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
@Override
public void setStyle(Horse.Style bukkitStyle) {
    if (getBukkitEntity() instanceof Horse) {
        ((Horse) getBukkitEntity()).setStyle(bukkitStyle);
    }
}
 
开发者ID:TechzoneMC,项目名称:SonarPet,代码行数:7,代码来源:NMSEntityHorseImpl.java

示例11: getStyle

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

示例12: setStyle

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public void setStyle(Horse.Style style) {
    this.style = style;
    if (getNPC().isSpawned()) ((Horse) getNPC().getEntity()).setStyle(style);
}
 
开发者ID:leMaik,项目名称:RpgPlus,代码行数:5,代码来源:HorseTrait.java

示例13: spawnHorse

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
LivingEntity spawnHorse(Location loc, HorseType type, Horse.Color color,
Horse.Style style, boolean tame, boolean chest);
 
开发者ID:dmulloy2,项目名称:SwornAPI,代码行数:3,代码来源:SpecialEntities.java

示例14: of

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static HorseStyle of(Horse.Style style) {
    return STYLE_CONVERTER.convert(style);
}
 
开发者ID:LapisBlue,项目名称:Pore,代码行数:4,代码来源:HorseConverter.java

示例15: onEnable

import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public void onEnable() {
	
	this.saveDefaultConfig();
	
	PluginManager pm = getServer().getPluginManager();
	pm.registerEvents(this, this);
	
	this.DisableSpawning = ((Boolean) this.getConfig().get("disable-spawning") == true) ? true : false;
	this.DisableItemDrops = ((Boolean) this.getConfig().get("disable-item-drops") == true) ? true : false;
	
	this.mountVariants = new HashMap<String, Horse.Variant>();
	this.mountVariants.put("horse", Horse.Variant.HORSE);
	this.mountVariants.put("mule", Horse.Variant.MULE);
	this.mountVariants.put("donkey", Horse.Variant.DONKEY);
	this.mountVariants.put("skeleton", Horse.Variant.SKELETON_HORSE);
	this.mountVariants.put("zombie", Horse.Variant.UNDEAD_HORSE);
	
	this.mountStyles = new HashMap<String, Horse.Style>();
	this.mountStyles.put("default", Horse.Style.NONE);
	this.mountStyles.put("white", Horse.Style.WHITE);
	this.mountStyles.put("whitefield", Horse.Style.WHITEFIELD);
	this.mountStyles.put("whitedots", Horse.Style.WHITE_DOTS);
	this.mountStyles.put("blackdots", Horse.Style.BLACK_DOTS);
	
	this.mountColors = new HashMap<String, Horse.Color>();
	this.mountColors.put("white", Horse.Color.WHITE);
	this.mountColors.put("creamy", Horse.Color.CREAMY);
	this.mountColors.put("chestnut", Horse.Color.CHESTNUT);
	this.mountColors.put("brown", Horse.Color.BROWN);
	this.mountColors.put("black", Horse.Color.BLACK);
	this.mountColors.put("gray", Horse.Color.GRAY);
	this.mountColors.put("darkbrown", Horse.Color.DARK_BROWN);
	
	this.mountArmor = new HashMap<String, Material>();
	this.mountArmor.put("iron", Material.IRON_BARDING);
	this.mountArmor.put("gold", Material.GOLD_BARDING);
	this.mountArmor.put("diamond", Material.DIAMOND_BARDING);
	
	// Commands
	getCommand("hm").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("horsemount").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("mount").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("dismount").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("setmount").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("setarmor").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("showmount").setExecutor(new HorseMountCommandExecutor(this));
	getCommand("spawnmount").setExecutor(new HorseMountCommandExecutor(this));
	
	// Plugin Metrics
	try {
	    Metrics metrics = new Metrics(this);
	    metrics.start();
	} catch (IOException e) {
		getLogger().info("Failed to submit stats to MCStats.org");
	}
}
 
开发者ID:ktross,项目名称:HorseMount,代码行数:57,代码来源:HorseMount.java


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