本文整理汇总了Java中me.libraryaddict.disguise.disguisetypes.MobDisguise类的典型用法代码示例。如果您正苦于以下问题:Java MobDisguise类的具体用法?Java MobDisguise怎么用?Java MobDisguise使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MobDisguise类属于me.libraryaddict.disguise.disguisetypes包,在下文中一共展示了MobDisguise类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: enableCosmetic
import me.libraryaddict.disguise.disguisetypes.MobDisguise; //导入依赖的package包/类
@Override
public void enableCosmetic(Player player, DisguiseCosmetic cosmetic, ClickType clickType, boolean login, NullType useless)
{
MobDisguise disguise = new MobDisguise(cosmetic.getDisguiseType());
disguise.setShowName(true);
disguise.setViewSelfDisguise(false);
DisguiseAPI.disguiseToAll(player, disguise);
if (!login)
player.sendMessage(PlayerManager.COSMETICS_TAG + ChatColor.GREEN + "Vous êtes maintenant déguisé !");
}
示例2: getFactory
import me.libraryaddict.disguise.disguisetypes.MobDisguise; //导入依赖的package包/类
@SuppressWarnings({"unchecked", "varargs"})
public static <T> Object getFactory(DISTYPE distype, T name) {
if (distype.toString().equalsIgnoreCase(DISTYPE.PLAYERD.toString())) {
return new PlayerDisguise((String) name);
}
if (distype.toString().equalsIgnoreCase(DISTYPE.MODD.toString())) {
return new MobDisguise((DisguiseType) name);
}
return new MiscDisguise((DisguiseType) name);
}
示例3: get
import me.libraryaddict.disguise.disguisetypes.MobDisguise; //导入依赖的package包/类
@Override
@Nullable
protected Disguise[] get(Event e) {
DisguiseType disguiseType = null;
if (typeToggle) {
for (DisguiseType dtype : DisguiseType.values()) {
if (typeString.getSingle(e).equals(dtype.name())) {
disguiseType = dtype;
}
}
} else {
disguiseType = type.getSingle(e);
}
if (disguiseType != null) {
if (disguiseType.isMisc()) {
if (data != null && block != null) {
return new Disguise[]{new MiscDisguise(disguiseType, block.getSingle(e), data.getSingle(e))};
} else if (data != null && block == null) {
return new Disguise[]{new MiscDisguise(disguiseType, data.getSingle(e))};
} else if (data == null && block != null) {
return new Disguise[]{new MiscDisguise(disguiseType, block.getSingle(e))};
} else {
return new Disguise[]{new MiscDisguise(disguiseType)};
}
} else if (disguiseType.isMob()) {
if (baby != null) {
return new Disguise[]{new MobDisguise(disguiseType, baby.getSingle(e))};
} else {
return new Disguise[]{new MobDisguise(disguiseType)};
}
} else if (disguiseType.isPlayer()) {
if (name != null) {
return new Disguise[]{new PlayerDisguise(name.getSingle(e))};
} else {
return new Disguise[]{new PlayerDisguise("Notch")};
}
} else {
Bukkit.getConsoleSender().sendMessage(Skellett.cc(Skellett.prefix + "&cUnknown DisguiseType " + disguiseType));
}
}
return null;
}