#DamageSource to DamageType Migration

3 messages · Page 1 of 1 (latest)

cedar karma
#

looking to try to replace this script's damagesource with a damage type.

EntityEvents.hurt(event => {
    const {entity, source,level} = event
    if(!entity.isPlayer()) return
    let player = entity

    if(source == 'DamageSource (arrow)'){
    let x = Math.floor(player.x)
    let z = Math.floor(player.z)    
    let potion = player.potionEffects
    potion.add('minecraft:blindness', 2*20, 0, false, false)
}})```
plush ibexBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

cedar karma