From 594106047973735d83136ff1297410fc8e10bf7d Mon Sep 17 00:00:00 2001 From: 24Cr <117180850+24cr-oxide@users.noreply.github.com> Date: Fri, 3 May 2024 21:49:32 +0300 Subject: [PATCH] Fix IllegalArgumentException --- .../spigot/integrations/hologram/HologramDecentHolograms.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/hologram/HologramDecentHolograms.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/hologram/HologramDecentHolograms.kt index 5951d1ada..a4838c54a 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/hologram/HologramDecentHolograms.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/hologram/HologramDecentHolograms.kt @@ -27,7 +27,10 @@ class HologramDecentHolograms : HologramIntegration { } override fun setContents(contents: List) { - DHAPI.setHologramLines(DHAPI.getHologram(id), contents) + val hologram = DHAPI.getHologram(id) + if (hologram != null) { + DHAPI.setHologramLines(hologram, contents) + } } } }