mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
SPIGOT-3192: Return default value for invalid map icons
By: md_5 <git@md-5.net>
This commit is contained in:
parent
fab1910b0a
commit
66b6964877
11
paper-server/nms-patches/MapIcon.patch
Normal file
11
paper-server/nms-patches/MapIcon.patch
Normal file
@ -0,0 +1,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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user