本文整理汇总了Java中com.gmail.filoghost.holographicdisplays.api.HologramsAPI.createHologram方法的典型用法代码示例。如果您正苦于以下问题:Java HologramsAPI.createHologram方法的具体用法?Java HologramsAPI.createHologram怎么用?Java HologramsAPI.createHologram使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.gmail.filoghost.holographicdisplays.api.HologramsAPI
的用法示例。
在下文中一共展示了HologramsAPI.createHologram方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPlayerStatisticHologram
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI; //导入方法依赖的package包/类
private Hologram createPlayerStatisticHologram(Player player, Location holoLocation) {
final Hologram holo = HologramsAPI.createHologram(BedwarsRel.getInstance(), holoLocation);
holo.getVisibilityManager().setVisibleByDefault(false);
holo.getVisibilityManager().showTo(player);
this.updatePlayerStatisticHologram(player, holo);
return holo;
}
示例2: spawnNPCs
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI; //导入方法依赖的package包/类
public static void spawnNPCs(){
Entity pet = Bukkit.getWorld(world).spawnEntity(new Location(Bukkit.getWorld(world), -1249, 55, 242, -120, 0).add(0.5, 0, 0.5), EntityType.VILLAGER);
EntityUtils.noAI(pet);
entitys.add(pet);
Hologram petHolo = HologramsAPI.createHologram(Main.getPlugin(), pet.getLocation().add(0, 2.6, 0));
petHolo.appendTextLine(MiscUtils.color("&bPet Shop"));
petHolo.appendTextLine(MiscUtils.color("&7&lSoonTM"));
holograms.add(petHolo);
Entity merchant = Bukkit.getWorld(world).spawnEntity(new Location(Bukkit.getWorld(world), -1197, 54, 59, -15, 0).add(0.5, 0, 0.5), EntityType.VILLAGER);
EntityUtils.noAI(merchant);
entitys.add(merchant);
Hologram merchantHolo = HologramsAPI.createHologram(Main.getPlugin(), merchant.getLocation().add(0, 2.6, 0));
merchantHolo.appendTextLine(MiscUtils.color("&bKleding Shop"));
merchantHolo.appendTextLine(MiscUtils.color("&7&lSoonTM"));
holograms.add(merchantHolo);
Entity gadget = Bukkit.getWorld(world).spawnEntity(new Location(Bukkit.getWorld(world), -1249, 55, 238, -50, 0).add(0.5,0,0.5), EntityType.VILLAGER);
gadgetEntity = gadget;
EntityUtils.noAI(gadget);
entitys.add(gadget);
Hologram gadgetHolo = HologramsAPI.createHologram(Main.getPlugin(), gadget.getLocation().add(0, 2.6, 0));
gadgetHolo.appendTextLine(MiscUtils.color("&bGadget Shop"));
gadgetHolo.appendTextLine(MiscUtils.color("&a&lRIGHT CLICK"));
holograms.add(gadgetHolo);
Entity food = Bukkit.getWorld(world).spawnEntity(new Location(Bukkit.getWorld(world), -1184, 54, 60, -180, 0).add(0.5,0,0.5), EntityType.VILLAGER);
EntityUtils.noAI(food);
entitys.add(food);
Hologram foodHolo = HologramsAPI.createHologram(Main.getPlugin(), food.getLocation().add(0, 2.6, 0));
foodHolo.appendTextLine(MiscUtils.color("&bCocktail Bar"));
foodHolo.appendTextLine(MiscUtils.color("&7&lSoonTM"));
holograms.add(foodHolo);
}
示例3: create
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI; //导入方法依赖的package包/类
/**
* Creates a Hologram Checkpoint. The checkpoint will
* display as inactive until a Zombie comes close enough.
*
* @param plugin the plugin instance
*/
public void create(Plugin plugin) {
activated = false;
if (hologram == null) {
hologram = HologramsAPI.createHologram(plugin, location);
hologram.appendTextLine(Utils.color("&a&lCHECKPOINT #" + id));
hologram.appendTextLine(Utils.color("Not Active"));
} else {
hologram.removeLine(1);
hologram.appendTextLine("Not Active");
}
}
示例4: appendVaultHologram
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI; //导入方法依赖的package包/类
/**
* Appends the vault hologram
*
* @param guild guild instance
*/
public void appendVaultHologram(NovaGuild guild) {
if(Config.HOLOGRAPHICDISPLAYS_ENABLED.getBoolean()) {
if(Config.VAULT_HOLOGRAM_ENABLED.getBoolean()) {
checkVaultDestroyed(guild);
if(guild.getVaultLocation() != null) {
if(guild.getVaultHologram() == null) {
Location hologramLocation = guild.getVaultLocation().clone();
hologramLocation.add(0.5, 2, 0.5);
Hologram hologram = HologramsAPI.createHologram(plugin, hologramLocation);
hologram.getVisibilityManager().setVisibleByDefault(false);
for(String hologramLine : Config.VAULT_HOLOGRAM_LINES.getStringList()) {
if(hologramLine.startsWith("[ITEM]")) {
hologramLine = hologramLine.substring(6);
ItemStack itemStack = ItemStackUtils.stringToItemStack(hologramLine);
if(itemStack != null) {
hologram.appendItemLine(itemStack);
}
}
else {
hologram.appendTextLine(StringUtils.fixColors(hologramLine));
}
}
guild.setVaultHologram(hologram);
for(Player player : guild.getOnlinePlayers()) {
guild.showVaultHologram(player);
}
}
}
}
}
}
示例5: create
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI; //导入方法依赖的package包/类
public void create(Location location, Crate crate, ArrayList<String> lines) {
com.gmail.filoghost.holographicdisplays.api.Hologram hologram = HologramsAPI.createHologram(crate.getCratesPlus(), location.clone().add(0, 1.25, 0));
for (String line : lines) {
hologram.appendTextLine(line);
}
holograms.put("" + location.getWorld().getName() + "|" + location.getBlockX() + "|" + location.getBlockY() + "|" + location.getBlockZ(), hologram);
}
示例6: create
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI; //导入方法依赖的package包/类
@Override
public void create() {
hologram = HologramsAPI.createHologram(NovaGuilds.getInstance(), location);
refresh();
}