本文整理汇总了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;
}
示例2: setStyle
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public void setStyle(Horse.Style style){
datawatcher.set(STYLE, getColor().ordinal() & 0xFF | style.ordinal() << 8);
}
示例3: getStyle
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public Horse.Style getStyle(){
return Horse.Style.values()[(getVariant() >>> 8)];
}
示例4: setStyle
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public void setStyle(Horse.Style style){
datawatcher.watch(20, getColor().ordinal() & 0xFF | style.ordinal() << 8);
}
示例5: get
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static Horse.Style get(String string) {
return instance()._get(string);
}
示例6: getName
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static String getName(Horse.Style key) {
return instance()._getName(key);
}
示例7: getDisplayName
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static String getDisplayName(Horse.Style key) {
return instance()._getDisplayName(key);
}
示例8: getAliases
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static List<String> getAliases(Horse.Style key) {
return instance()._getAliases(key);
}
示例9: setStyle
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
@Override
public void setStyle(Horse.Style bukkitStyle) {
getBukkitEntity().setStyle(bukkitStyle);
}
示例10: setStyle
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
@Override
public void setStyle(Horse.Style bukkitStyle) {
if (getBukkitEntity() instanceof Horse) {
((Horse) getBukkitEntity()).setStyle(bukkitStyle);
}
}
示例11: getStyle
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public Horse.Style getStyle() {
return style;
}
示例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);
}
示例13: spawnHorse
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
LivingEntity spawnHorse(Location loc, HorseType type, Horse.Color color,
Horse.Style style, boolean tame, boolean chest);
示例14: of
import org.bukkit.entity.Horse; //导入方法依赖的package包/类
public static HorseStyle of(Horse.Style style) {
return STYLE_CONVERTER.convert(style);
}
示例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");
}
}