Skip to content

Commit 1ff5f72

Browse files
committed
properly implement FHHologram
1 parent 957a32f commit 1ff5f72

File tree

2 files changed

+11
-10
lines changed
  • spigot/fancyholograms

2 files changed

+11
-10
lines changed

spigot/fancyholograms/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<dependency>
3939
<groupId>de.oliver</groupId>
4040
<artifactId>FancyHolograms</artifactId>
41-
<version>2.4.0</version>
41+
<version>2.4.1</version>
4242
<scope>provided</scope>
4343
</dependency>
4444

spigot/fancyholograms/src/main/java/io/github/projectunified/unihologram/spigot/fancyholograms/FHHologram.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,26 @@ public void setScale(DisplayScale scale) {
227227
@Override
228228
public float getShadowRadius() {
229229
checkHologramInitialized();
230-
return hologram.getDisplayEntity().getShadowRadius();
230+
return ((DisplayHologramData) hologram.getData()).getShadowRadius();
231231
}
232232

233233
@Override
234234
public void setShadowRadius(float radius) {
235235
checkHologramInitialized();
236-
hologram.getDisplayEntity().setShadowRadius(radius);
236+
((DisplayHologramData) hologram.getData()).setShadowRadius(radius);
237237
updateHologram();
238238
}
239239

240240
@Override
241241
public float getShadowStrength() {
242242
checkHologramInitialized();
243-
return hologram.getDisplayEntity().getShadowStrength();
243+
return ((DisplayHologramData) hologram.getData()).getShadowStrength();
244244
}
245245

246246
@Override
247247
public void setShadowStrength(float strength) {
248248
checkHologramInitialized();
249-
hologram.getDisplayEntity().setShadowStrength(strength);
249+
((DisplayHologramData) hologram.getData()).setShadowStrength(strength);
250250
updateHologram();
251251
}
252252

@@ -269,7 +269,7 @@ public void setShadowed(boolean shadowed) {
269269
@Override
270270
public DisplayBillboard getBillboard() {
271271
checkHologramInitialized();
272-
switch (hologram.getDisplayEntity().getBillboard()) {
272+
switch (((DisplayHologramData) hologram.getData()).getBillboard()) {
273273
case FIXED:
274274
return DisplayBillboard.FIXED;
275275
case VERTICAL:
@@ -284,18 +284,19 @@ public DisplayBillboard getBillboard() {
284284
@Override
285285
public void setBillboard(DisplayBillboard billboard) {
286286
checkHologramInitialized();
287+
DisplayHologramData data = (DisplayHologramData) hologram.getData();
287288
switch (billboard) {
288289
case FIXED:
289-
hologram.getDisplayEntity().setBillboard(Display.Billboard.FIXED);
290+
data.setBillboard(Display.Billboard.FIXED);
290291
break;
291292
case VERTICAL:
292-
hologram.getDisplayEntity().setBillboard(Display.Billboard.VERTICAL);
293+
data.setBillboard(Display.Billboard.VERTICAL);
293294
break;
294295
case HORIZONTAL:
295-
hologram.getDisplayEntity().setBillboard(Display.Billboard.HORIZONTAL);
296+
data.setBillboard(Display.Billboard.HORIZONTAL);
296297
break;
297298
default:
298-
hologram.getDisplayEntity().setBillboard(Display.Billboard.CENTER);
299+
data.setBillboard(Display.Billboard.CENTER);
299300
break;
300301
}
301302
updateHologram();

0 commit comments

Comments
 (0)