1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 09:24:48 +00:00
zumbiepig b0a03d94c8 .
2024-08-17 10:43:32 -07:00

45 lines
1.1 KiB
JavaScript

ModAPI.require("player");
ModAPI.addEventListener("sendchatmessage", function (event) {
event.message = `${event.message}`
.replaceAll("{health}", ModAPI.player.getHealth() / 2 + "❤")
.replaceAll(
"{pos}",
Math.floor(ModAPI.player.x) +
" " +
Math.floor(ModAPI.player.y) +
" " +
Math.floor(ModAPI.player.z)
).replaceAll(
"{name}",
ModAPI.player.getDisplayName()
).replaceAll(
"{me}",
ModAPI.player.getDisplayName()
).replaceAll(
"{x}",
Math.floor(ModAPI.player.x)
).replaceAll(
"{y}",
Math.floor(ModAPI.player.y)
).replaceAll(
"{z}",
Math.floor(ModAPI.player.z)
).replaceAll(
"{level}",
ModAPI.player.experienceLevel
).replaceAll(
"{walked}",
Math.floor(ModAPI.player.movedDistance)
).replaceAll(
"{chunk}",
Math.floor(ModAPI.player.chunkCoordX) +
" " +
Math.floor(ModAPI.player.chunkCoordY) +
" " +
Math.floor(ModAPI.player.chunkCoordZ)
).replaceAll(
"\\n",
"\n"
);
});