當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。