本文整理匯總了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;
}