Posted November 28, 20204 yr Hello Modders, Is there a way to get the number of deaths a player has from his statistics? MC version 1.15.2 I have been looking for a solution for hours but I cant find the answer. Edited November 28, 20204 yr by Babatunde
November 28, 20204 yr I think you can retrieve the player stats from ServerPlayerEntity#getStats. Note that in 1.15.2 the name of the method may not be the same. Take a look at the Stats class also Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
November 28, 20204 yr 59 minutes ago, Beethoven92 said: I think you can retrieve the player stats from ServerPlayerEntity#getStats Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
November 28, 20204 yr Author I don't think there is a way to get the number of deaths with ServerPlayerEntity#getStats either
November 28, 20204 yr What makes you think that? Have you tried? Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
November 28, 20204 yr Author Ye, I've tried everything I could think of and I have done hours of research.
November 28, 20204 yr You can do: But this only works on logical Servers. int deaths = ServerWorld#getServer().getPlayerList().getPlayerStats(PlayerEntity).getValue(Stats.CUSTOM, Stats.DEATHS); Edited November 28, 20204 yr by Sr_endi
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.