Posted January 27, 20205 yr I want to show Custom DeathMessage("%playername died by malnutrition") when player dies by onDeath method. However, onDeath method always shows "%playername died." How do I change this? public static DamageSource Malnutrition = new DamageSource("Malnutrition"); @SubscribeEvent public static void killPlayer(TickEvent.PlayerTickEvent event) { if (!event.player.world.isRemote()) { if (/* check player */) { if (event.player.isAlive()) { event.player.setHealth(0.0f); event.player.onDeath(Malnutrition); } } } } Edited January 28, 20205 yr by kyazuki
January 28, 20205 yr Author Sorry, I completely thought I must call language register methods. Thank you for your help! Edited January 28, 20205 yr by kyazuki
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.