From fa1f8d260e9914adf1001028deea08ab573a2bef Mon Sep 17 00:00:00 2001 From: filoghost Date: Mon, 3 Jun 2019 10:45:33 +0200 Subject: [PATCH] Fix typo --- .../current/ProtocolLibHookImpl.java | 2 +- .../object/line/CraftTextLine.java | 36 +++++++++---------- .../placeholder/PlaceholdersManager.java | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java index dfe5cc38..d8196ee2 100644 --- a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java +++ b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java @@ -309,7 +309,7 @@ public class ProtocolLibHookImpl implements ProtocolLibHook { CraftTextLine textLine = (CraftTextLine) line; if (textLine.isSpawned()) { - sendSpawnArmorStandPacket(player, (NMSArmorStand) textLine.getNmsNameble()); + sendSpawnArmorStandPacket(player, (NMSArmorStand) textLine.getNmsNameable()); } } else if (line instanceof CraftItemLine) { diff --git a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/object/line/CraftTextLine.java b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/object/line/CraftTextLine.java index fb4040e0..e8cd660b 100644 --- a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/object/line/CraftTextLine.java +++ b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/object/line/CraftTextLine.java @@ -35,7 +35,7 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { private String text; private List relativePlaceholders; - private NMSNameable nmsNameble; + private NMSNameable nmsNameable; public CraftTextLine(CraftHologram parent, String text) { @@ -53,14 +53,14 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { public void setText(String text) { this.text = text; - if (nmsNameble != null) { + if (nmsNameable != null) { if (text != null && !text.isEmpty()) { - nmsNameble.setCustomNameNMS(text); + nmsNameable.setCustomNameNMS(text); if (getParent().isAllowPlaceholders()) { PlaceholdersManager.trackIfNecessary(this); } } else { - nmsNameble.setCustomNameNMS(""); // It will not appear + nmsNameable.setCustomNameNMS(""); // It will not appear if (getParent().isAllowPlaceholders()) { PlaceholdersManager.untrack(this); } @@ -86,8 +86,8 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { @Override public void setTouchHandler(TouchHandler touchHandler) { - if (nmsNameble != null) { - Location loc = nmsNameble.getBukkitEntityNMS().getLocation(); + if (nmsNameable != null) { + Location loc = nmsNameable.getBukkitEntityNMS().getLocation(); super.setTouchHandler(touchHandler, loc.getWorld(), loc.getX(), loc.getY() - getTextOffset(), loc.getZ()); } else { super.setTouchHandler(touchHandler, null, 0, 0, 0); @@ -98,13 +98,13 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { public void spawn(World world, double x, double y, double z) { super.spawn(world, x, y, z); - nmsNameble = HolographicDisplays.getNMSManager().spawnNMSArmorStand(world, x, y + getTextOffset(), z, this); + nmsNameable = HolographicDisplays.getNMSManager().spawnNMSArmorStand(world, x, y + getTextOffset(), z, this); if (text != null && !text.isEmpty()) { - nmsNameble.setCustomNameNMS(text); + nmsNameable.setCustomNameNMS(text); } - nmsNameble.setLockTick(true); + nmsNameable.setLockTick(true); } @@ -112,9 +112,9 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { public void despawn() { super.despawn(); - if (nmsNameble != null) { - nmsNameble.killEntityNMS(); - nmsNameble = null; + if (nmsNameable != null) { + nmsNameable.killEntityNMS(); + nmsNameable = null; } } @@ -129,8 +129,8 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { public void teleport(double x, double y, double z) { super.teleport(x, y, z); - if (nmsNameble != null) { - nmsNameble.setLocationNMS(x, y + getTextOffset(), z); + if (nmsNameable != null) { + nmsNameable.setLocationNMS(x, y + getTextOffset(), z); } } @@ -138,17 +138,17 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine { public int[] getEntitiesIDs() { if (isSpawned()) { if (touchSlime != null) { - return ArrayUtils.add(touchSlime.getEntitiesIDs(), nmsNameble.getIdNMS()); + return ArrayUtils.add(touchSlime.getEntitiesIDs(), nmsNameable.getIdNMS()); } else { - return new int[] {nmsNameble.getIdNMS()}; + return new int[] {nmsNameable.getIdNMS()}; } } else { return new int[0]; } } - public NMSNameable getNmsNameble() { - return nmsNameble; + public NMSNameable getNmsNameable() { + return nmsNameable; } private double getTextOffset() { diff --git a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/placeholder/PlaceholdersManager.java b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/placeholder/PlaceholdersManager.java index d6678c81..e8ec06e1 100644 --- a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/placeholder/PlaceholdersManager.java +++ b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/placeholder/PlaceholdersManager.java @@ -109,7 +109,7 @@ public class PlaceholdersManager { Iterator iter = linesToUpdate.iterator(); while (iter.hasNext()) { DynamicLineData data = iter.next(); - if (data.getEntity() == line.getNmsNameble()) { + if (data.getEntity() == line.getNmsNameable()) { iter.remove(); data.getEntity().setCustomNameNMS(data.getOriginalName()); } @@ -117,7 +117,7 @@ public class PlaceholdersManager { } public static void trackIfNecessary(CraftTextLine line) { - NMSNameable nameableEntity = line.getNmsNameble(); + NMSNameable nameableEntity = line.getNmsNameable(); if (nameableEntity == null) { return; }