summaryrefslogtreecommitdiffstats
path: root/nms-patches/MapIcon.patch
blob: 8f7130f0ba77e5b9aa2e07a808572e24ae7f8976 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/net/minecraft/server/MapIcon.java
+++ b/net/minecraft/server/MapIcon.java
@@ -86,7 +86,7 @@
         }
 
         public static MapIcon.Type a(byte b0) {
-            return values()[b0];
+            return b0 >= 0 && b0 < values().length ? values()[b0] : MapIcon.Type.PLAYER; // CraftBukkit
         }
     }
 }