Skip to content

Commit

Permalink
Fix Player Name is not displayed if the block is set * and destroyed …
Browse files Browse the repository at this point in the history
…by player
  • Loading branch information
HirziDevs committed Jul 4, 2024
1 parent 24e0d82 commit d34a8fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ function Generator(

if (enableCommands && commands) {
for (const command of commands) {
if (previousBlock && command.block === previousBlock) dimension.runCommand(command.command.replaceAll("((PLAYER))", player.name));
else if (command.block === "*") dimension.runCommand(command.command);
if (previousBlock && (command.block === previousBlock || command.block === "*")) dimension.runCommand(command.command.replaceAll("((PLAYER))", player.name));
else if (command.block === "*" && !previousBlock) dimension.runCommand(command.command);
}
}
if (enableParticle && particle) {
Expand Down

0 comments on commit d34a8fc

Please sign in to comment.