From e899766d2899e0b758105a1da963cb6dafcdb5d4 Mon Sep 17 00:00:00 2001
From: RappyTV <rappytv@rappytv.com>
Date: Tue, 21 Nov 2023 19:56:15 +0100
Subject: [PATCH 1/5] Bump labygradle version

---
 settings.gradle.kts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/settings.gradle.kts b/settings.gradle.kts
index 5366d9c..1b141c8 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,7 +1,7 @@
 rootProject.name = "HeadOwner"
 
 pluginManagement {
-    val labyGradlePluginVersion = "0.3.29"
+    val labyGradlePluginVersion = "0.3.31"
     plugins {
         id("net.labymod.gradle") version (labyGradlePluginVersion)
     }

From 60f556a1978d9e2f3c5b3aaa84c6025e4c00a276 Mon Sep 17 00:00:00 2001
From: RappyTV <rappytv@rappytv.com>
Date: Tue, 21 Nov 2023 19:59:12 +0100
Subject: [PATCH 2/5] Remove newline

---
 .../v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java | 1 -
 .../v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java | 1 -
 .../v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java | 1 -
 .../v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java | 1 -
 .../v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java | 1 -
 .../v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java | 1 -
 .../v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java | 1 -
 .../v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java | 1 -
 .../v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java | 1 -
 .../v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java   | 1 -
 10 files changed, 10 deletions(-)

diff --git a/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java b/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java
index ea6d73a..13ec2f5 100644
--- a/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java
+++ b/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java b/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java
index 0602eee..6b1053b 100644
--- a/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java
+++ b/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java b/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java
index bb7bf55..01768da 100644
--- a/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java
+++ b/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java
@@ -88,7 +88,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java b/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java
index 97f0f9b..a5f6c2d 100644
--- a/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java
+++ b/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java
@@ -88,7 +88,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java b/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java
index 692c0ae..2f3fe3c 100644
--- a/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java
+++ b/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java b/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java
index ecbf510..010bcfd 100644
--- a/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java
+++ b/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java b/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java
index add8119..48cc5d5 100644
--- a/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java
+++ b/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java b/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java
index 0a68092..c90c7b8 100644
--- a/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java
+++ b/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java
@@ -88,7 +88,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java b/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java
index d223a0f..0013fc1 100644
--- a/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java
+++ b/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 
diff --git a/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java b/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java
index df79500..0094971 100644
--- a/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java
+++ b/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java
@@ -87,7 +87,6 @@ public String getCopy() {
             String value = this.value == null ? I18n.translate("headowner.messages.unknown") : this.value;
             String type = getSkullTypeName();
 
-
             return I18n.translate("headowner.messages.copyFormat", type, username, uuid, value);
         }
 

From 4be83959ce5aa9f747f08a5a0a9b65a1cafeb63c Mon Sep 17 00:00:00 2001
From: RappyTV <rappytv@rappytv.com>
Date: Tue, 21 Nov 2023 20:10:01 +0100
Subject: [PATCH 3/5] Add error message when trying to copy invalid skull data

---
 .../java/com/rappytv/headowner/listeners/KeyListener.java  | 7 ++++++-
 core/src/main/resources/assets/headowner/i18n/de_de.json   | 1 +
 core/src/main/resources/assets/headowner/i18n/en_us.json   | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/com/rappytv/headowner/listeners/KeyListener.java b/core/src/main/java/com/rappytv/headowner/listeners/KeyListener.java
index 232da5d..fa5c335 100644
--- a/core/src/main/java/com/rappytv/headowner/listeners/KeyListener.java
+++ b/core/src/main/java/com/rappytv/headowner/listeners/KeyListener.java
@@ -19,7 +19,12 @@ public KeyListener(HeadOwnerAddon addon) {
     @Subscribe
     public void onKey(KeyEvent event) {
         if(event.state() == State.PRESS && event.key() == addon.configuration().copyKey() && !Laby.labyAPI().minecraft().minecraftWindow().isScreenOpened()) {
-            Laby.labyAPI().minecraft().setClipboard(addon.getSkullApi().getCopy(addon.configuration()));
+            String skulldata = addon.getSkullApi().getCopy(addon.configuration());
+            if(skulldata == null) {
+                Laby.references().chatExecutor().displayClientMessage(Component.translatable("headowner.messages.nothingToCopy", NamedTextColor.RED));
+                return;
+            }
+            Laby.labyAPI().minecraft().setClipboard(skulldata);
             Laby.references().chatExecutor().displayClientMessage(Component.translatable("headowner.messages.copied", NamedTextColor.GREEN));
         }
     }
diff --git a/core/src/main/resources/assets/headowner/i18n/de_de.json b/core/src/main/resources/assets/headowner/i18n/de_de.json
index bfaf36f..c95787f 100644
--- a/core/src/main/resources/assets/headowner/i18n/de_de.json
+++ b/core/src/main/resources/assets/headowner/i18n/de_de.json
@@ -29,6 +29,7 @@
         "messages": {
             "copyFormat": "Kopf Typ: %s, Spielername: %s, UUID: %s, Texturenwert: %s",
             "copied": "Die Skull-Daten wurden in deine Zwischenablage gespeichert!",
+            "nothingToCopy": "Du schaust keinen gültigen Skull an!",
             "unknown": "Unbekannt",
             "unknownHead": "Unbekannter Kopf (wurde per Texturenwert erstellt)",
             "unknownHeadKey": "Unbekannter Kopf (wurde per Texturenwert erstellt, drücke %s um Daten zu kopieren)"
diff --git a/core/src/main/resources/assets/headowner/i18n/en_us.json b/core/src/main/resources/assets/headowner/i18n/en_us.json
index 3cd2f53..dd0f1b8 100644
--- a/core/src/main/resources/assets/headowner/i18n/en_us.json
+++ b/core/src/main/resources/assets/headowner/i18n/en_us.json
@@ -29,6 +29,7 @@
         "messages": {
             "copyFormat": "Skull type: %s, Username: %s, UUID: %s, Texture value: %s",
             "copied": "The skull data was copied to your clipboard!",
+            "nothingToCopy": "You're not looking at a valid skull!",
             "unknown": "Unknown",
             "unknownHead": "Unknown Head (created by texture value)",
             "unknownHeadKey": "Unknown Head (created by texture value, press %s to copy skull data)"

From 3fc7ed9243d953cbd211817af701570f37e9b19a Mon Sep 17 00:00:00 2001
From: RappyTV <rappytv@rappytv.com>
Date: Tue, 21 Nov 2023 20:13:42 +0100
Subject: [PATCH 4/5] Return null when there is no data to copy, add missing
 piglin in 1.19.4 implementation

---
 .../java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java    | 6 ++++--
 .../java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java    | 4 +++-
 .../java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java     | 4 +++-
 10 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java b/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java
index 13ec2f5..9ade847 100644
--- a/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java
+++ b/game-runner/src/v1_12_2/java/com/rappytv/headowner/v1_12_2/SkullApiImpl.java
@@ -25,7 +25,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getTileLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getTileLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java b/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java
index 6b1053b..07d1f98 100644
--- a/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java
+++ b/game-runner/src/v1_16_5/java/com/rappytv/headowner/v1_16_5/SkullApiImpl.java
@@ -26,7 +26,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java b/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java
index 01768da..af100ae 100644
--- a/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java
+++ b/game-runner/src/v1_17_1/java/com/rappytv/headowner/v1_17_1/SkullApiImpl.java
@@ -27,7 +27,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java b/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java
index a5f6c2d..7b0c557 100644
--- a/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java
+++ b/game-runner/src/v1_18_2/java/com/rappytv/headowner/v1_18_2/SkullApiImpl.java
@@ -27,7 +27,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java b/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java
index 2f3fe3c..7ee6765 100644
--- a/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java
+++ b/game-runner/src/v1_19_2/java/com/rappytv/headowner/v1_19_2/SkullApiImpl.java
@@ -26,7 +26,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java b/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java
index 010bcfd..26b1dad 100644
--- a/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java
+++ b/game-runner/src/v1_19_3/java/com/rappytv/headowner/v1_19_3/SkullApiImpl.java
@@ -26,7 +26,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java b/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java
index 48cc5d5..c3c5547 100644
--- a/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java
+++ b/game-runner/src/v1_19_4/java/com/rappytv/headowner/v1_19_4/SkullApiImpl.java
@@ -26,7 +26,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
@@ -99,7 +101,7 @@ private String getSkullTypeName() {
                 case PLAYER -> I18n.translate("headowner.types.player");
                 case CREEPER -> I18n.translate("headowner.types.creeper");
                 case DRAGON -> I18n.translate("headowner.types.dragon");
-                default -> null;
+                case PIGLIN -> I18n.translate("headowner.types.piglin");
             };
         }
     }
diff --git a/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java b/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java
index c90c7b8..d1b94c1 100644
--- a/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java
+++ b/game-runner/src/v1_20_1/java/com/rappytv/headowner/v1_20_1/SkullApiImpl.java
@@ -27,7 +27,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java b/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java
index 0013fc1..7407ef2 100644
--- a/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java
+++ b/game-runner/src/v1_20_2/java/com/rappytv/headowner/v1_20_2/SkullApiImpl.java
@@ -26,7 +26,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getBlockLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getBlockLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {
diff --git a/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java b/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java
index 0094971..f8cb73e 100644
--- a/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java
+++ b/game-runner/src/v1_8_9/java/com/rappytv/headowner/v1_8_9/SkullApiImpl.java
@@ -25,7 +25,9 @@ public String getDisplay(HeadOwnerConfig config) {
 
     @Override
     public String getCopy(HeadOwnerConfig config) {
-        return new Skull(Skull.getTileLooking(config.distance())).getCopy();
+        Skull skull = new Skull(Skull.getTileLooking(config.distance()));
+        if(skull.getSkullTypeName() == null) return null;
+        return skull.getCopy();
     }
 
     public static class Skull {

From bf6f8ed8b01c2371191c491725e6f811c2ebae6f Mon Sep 17 00:00:00 2001
From: RappyTV <rappytv@rappytv.com>
Date: Tue, 21 Nov 2023 20:16:36 +0100
Subject: [PATCH 5/5] Bump version

---
 build.gradle.kts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index bb6477b..25270e0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -17,7 +17,7 @@ labyMod {
         author = "RappyTV"
         description = "Shows the owner or head type of the head you're looking at"
         minecraftVersion = "1.8<1.20.2"
-        version = System.getenv().getOrDefault("VERSION", "1.0.2")
+        version = System.getenv().getOrDefault("VERSION", "1.0.3")
     }
 
     minecraft {