#player not defined??

1 messages · Page 1 of 1 (latest)

fallen bane
#

capitalize Player

#

did you import Player?

quick panther
#

Player
uppercase

#

wait i need to load my game

fallen frigate
#

try
world.afterEvents.entityHitEntity.subscribe((event) => {
const player = event.damagingEntity;
const hit = event.hitEntity;
if (!hit) return;
//gif 1
if (hit.typeId == 'entity:ex') {
player.runCommand("give @s diamond")
}
});

fallen bane
#

wait isn't the type id of the normal villager minecraft:villager_v2

quick panther