Add safety checks to the book UI when the player is lost (death/dimension change should can cause that)

This commit is contained in:
Bernhard Bonigl committed 2016-06-17 20:10:12 +02:00
1 parent 273cca6465
commit 4b42e30be6
2 files changed
+6

No files matched your search

@@ -155,6 +155,9 @@ public class BookLoader implements IResourceManagerReloadListener {
}
public static void updateSavedPage(EntityPlayer player, ItemStack item, String page) {
if(player == null) {
return;
}
if(player.getHeldItem(EnumHand.MAIN_HAND) == null) {
return;
}