You can now enable and disable holograms for entities and items globally

This commit is contained in:
Brianna 2019-06-06 12:36:59 -04:00
parent b5f5c4451e
commit 42587c8b22
3 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,8 @@ public class EntityStack {
}
public void updateStack() {
if (!Setting.ENTITY_HOLOGRAMS.getBoolean()) return;
Entity entity = getEntityByUniqueId(this.entity);
if (entity == null) return;

View File

@ -109,7 +109,8 @@ public class ItemListeners implements Listener {
item.getItemStack().setAmount(newAmount);
}
if (instance.getItemFile().getConfig().getBoolean("Items." + material + ".Has Hologram")) {
if (instance.getItemFile().getConfig().getBoolean("Items." + material + ".Has Hologram")
&& Setting.ITEM_HOLOGRAMS.getBoolean()) {
item.setCustomName(name);
item.setCustomNameVisible(true);
}

View File

@ -32,6 +32,9 @@ public enum Setting {
MIN_STACK_ENTITIES("Entity.Min Stack Amount", 5,
"The minimum amount required before a stack can be formed."),
ENTITY_HOLOGRAMS("Entity.Holograms Enabled", true,
"Should holograms be displayed above stacked entities?"),
HOLOGRAMS_ON_LOOK_ENTITY("Entity.Only Show Holograms On Look", false,
"Only show nametags above an entities head when looking directly at them."),
@ -84,6 +87,9 @@ public enum Setting {
NAME_FORMAT_ITEM("Item.Name Format", "&f{TYPE} &6{AMT}x",
"The text displayed above a dropped item."),
ITEM_HOLOGRAMS("Item.Holograms Enabled", true,
"Should holograms be displayed above stacked items?"),
SPAWNER_HOLOGRAMS("Spawners.Holograms Enabled", true,
"Should holograms be displayed above stacked spawners?"),